/**
 * Created by lizhe on 2018/5/2.
 */
/*!
 * froala_editor v2.8.0 (https://www.froala.com/wysiwyg-editor)
 * License https://froala.com/wysiwyg-editor/terms/
 * Copyright 2014-2018 Froala Labs
 */

!
    function(n) {
        "function" == typeof define && define.amd ? define(["jquery"], n) : "object" == typeof module && module.exports ? module.exports = function(e, t) {
            return t === undefined && (t = "undefined" != typeof window ? require("jquery") : require("jquery")(e)), n(t)
        } : n(window.jQuery)
    }(function(M) {
        var s = function(e, t) {
            this.id = ++M.FE.ID, this.opts = M.extend(!0, {}, M.extend({}, s.DEFAULTS, "object" == typeof t && t));
            var n = JSON.stringify(this.opts);
            M.FE.OPTS_MAPPING[n] = M.FE.OPTS_MAPPING[n] || this.id, this.sid = M.FE.OPTS_MAPPING[n], M.FE.SHARED[this.sid] = M.FE.SHARED[this.sid] || {}, this.shared = M.FE.SHARED[this.sid], this.shared.count = (this.shared.count || 0) + 1, this.$oel = M(e), this.$oel.data("froala.editor", this), this.o_doc = e.ownerDocument, this.o_win = "defaultView" in this.o_doc ? this.o_doc.defaultView : this.o_doc.parentWindow;
            var r = M(this.o_win).scrollTop();
            this.$oel.on("froala.doInit", M.proxy(function() {
                this.$oel.off("froala.doInit"), this.doc = this.$el.get(0).ownerDocument, this.win = "defaultView" in this.doc ? this.doc.defaultView : this.doc.parentWindow, this.$doc = M(this.doc), this.$win = M(this.win), this.opts.pluginsEnabled || (this.opts.pluginsEnabled = Object.keys(M.FE.PLUGINS)), this.opts.initOnClick ? (this.load(M.FE.MODULES), this.$el.on("touchstart.init", function() {
                    M(this).data("touched", !0)
                }), this.$el.on("touchmove.init", function() {
                    M(this).removeData("touched")
                }), this.$el.on("mousedown.init touchend.init dragenter.init focus.init", M.proxy(function(e) {
                    if ("touchend" == e.type && !this.$el.data("touched")) return !0;
                    if (1 === e.which || !e.which) {
                        this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"), this.load(M.FE.MODULES), this.load(M.FE.PLUGINS);
                        var t = e.originalEvent && e.originalEvent.originalTarget;
                        t && "IMG" == t.tagName && M(t).trigger("mousedown"), "undefined" == typeof this.ul && this.destroy(), "touchend" == e.type && this.image && e.originalEvent && e.originalEvent.target && M(e.originalEvent.target).is("img") && setTimeout(M.proxy(function() {
                            this.image.edit(M(e.originalEvent.target))
                        }, this), 100), this.ready = !0, this.events.trigger("initialized")
                    }
                }, this)), this.events.trigger("initializationDelayed")) : (this.load(M.FE.MODULES), this.load(M.FE.PLUGINS), M(this.o_win).scrollTop(r), "undefined" == typeof this.ul && this.destroy(), this.ready = !0, this.events.trigger("initialized"))
            }, this)), this._init()
        };
        s.DEFAULTS = {
            initOnClick: !1,
            pluginsEnabled: null
        }, s.MODULES = {}, s.PLUGINS = {}, s.VERSION = "2.8.0", s.INSTANCES = [], s.OPTS_MAPPING = {}, s.SHARED = {}, s.ID = 0, s.prototype._init = function() {
            var e = this.$oel.prop("tagName");
            1 <= this.$oel.closest("label").length && console.warn("Note! It is not recommended to initialize the Froala Editor within a label tag.");
            var t = M.proxy(function() {
                    "TEXTAREA" != e && (this._original_html = this._original_html || this.$oel.html()), this.$box = this.$box || this.$oel, this.opts.fullPage && (this.opts.iframe = !0), this.opts.iframe ? (this.$iframe = M('<iframe src="about:blank" frameBorder="0">'), this.$wp = M("<div></div>"), this.$box.html(this.$wp), this.$wp.append(this.$iframe), this.$iframe.get(0).contentWindow.document.open(), this.$iframe.get(0).contentWindow.document.write("<!DOCTYPE html>"), this.$iframe.get(0).contentWindow.document.write("<html><head></head><body></body></html>"), this.$iframe.get(0).contentWindow.document.close(), this.$el = this.$iframe.contents().find("body"), this.el = this.$el.get(0), this.$head = this.$iframe.contents().find("head"), this.$html = this.$iframe.contents().find("html"), this.iframe_document = this.$iframe.get(0).contentWindow.document) : (this.$el = M("<div></div>"), this.el = this.$el.get(0), this.$wp = M("<div></div>").append(this.$el), this.$box.html(this.$wp)), this.$oel.trigger("froala.doInit")
                }, this),
                n = M.proxy(function() {
                    this.$box = M("<div>"), this.$oel.before(this.$box).hide(), this._original_html = this.$oel.val(), this.$oel.parents("form").on("submit." + this.id, M.proxy(function() {
                        this.events.trigger("form.submit")
                    }, this)), this.$oel.parents("form").on("reset." + this.id, M.proxy(function() {
                        this.events.trigger("form.reset")
                    }, this)), t()
                }, this),
                r = M.proxy(function() {
                    this.$el = this.$oel, this.el = this.$el.get(0), this.$el.attr("contenteditable", !0).css("outline", "none").css("display", "inline-block"), this.opts.multiLine = !1, this.opts.toolbarInline = !1, this.$oel.trigger("froala.doInit")
                }, this),
                o = M.proxy(function() {
                    this.$el = this.$oel, this.el = this.$el.get(0), this.opts.toolbarInline = !1, this.$oel.trigger("froala.doInit")
                }, this),
                i = M.proxy(function() {
                    this.$el = this.$oel, this.el = this.$el.get(0), this.opts.toolbarInline = !1, this.$oel.on("click.popup", function(e) {
                        e.preventDefault()
                    }), this.$oel.trigger("froala.doInit")
                }, this);
            this.opts.editInPopup ? i() : "TEXTAREA" == e ? n() : "A" == e ? r() : "IMG" == e ? o() : "BUTTON" == e || "INPUT" == e ? (this.opts.editInPopup = !0, this.opts.toolbarInline = !1, i()) : t()
        }, s.prototype.load = function(e) {
            for (var t in e) if (e.hasOwnProperty(t)) {
                if (this[t]) continue;
                if (M.FE.PLUGINS[t] && this.opts.pluginsEnabled.indexOf(t) < 0) continue;
                if (this[t] = new e[t](this), this[t]._init && (this[t]._init(), this.opts.initOnClick && "core" == t)) return !1
            }
        }, s.prototype.destroy = function() {
            this.shared.count--, this.events.$off();
            var e = this.html.get();
            if (this.opts.iframe && (this.events.disableBlur(), this.win.focus(), this.events.enableBlur()), this.events.trigger("destroy", [], !0), this.events.trigger("shared.destroy", undefined, !0), 0 === this.shared.count) {
                for (var t in this.shared) this.shared.hasOwnProperty(t) && (this.shared[t], M.FE.SHARED[this.sid][t] = null);
                delete M.FE.SHARED[this.sid]
            }
            this.$oel.parents("form").off("." + this.id), this.$oel.off("click.popup"), this.$oel.removeData("froala.editor"), this.$oel.off("froalaEditor"), this.core.destroy(e), M.FE.INSTANCES.splice(M.FE.INSTANCES.indexOf(this), 1)
        }, M.fn.froalaEditor = function(o) {
            for (var i = [], e = 0; e < arguments.length; e++) i.push(arguments[e]);
            if ("string" == typeof o) {
                var a = [];
                return this.each(function() {
                    var e, t, n = M(this).data("froala.editor");
                    if (!n) return console.warn("Editor should be initialized before calling the " + o + " method.");
                    if (0 < o.indexOf(".") && n[o.split(".")[0]] ? (n[o.split(".")[0]] && (e = n[o.split(".")[0]]), t = o.split(".")[1]) : (e = n, t = o.split(".")[0]), !e[t]) return M.error("Method " + o + " does not exist in Froala Editor.");
                    var r = e[t].apply(n, i.slice(1));
                    r === undefined ? a.push(this) : 0 === a.length && a.push(r)
                }), 1 == a.length ? a[0] : a
            }
            if ("object" == typeof o || !o) return this.each(function() {
                if (!M(this).data("froala.editor")) {
                    new s(this, o)
                }
            })
        }, M.fn.froalaEditor.Constructor = s, M.FroalaEditor = s, M.FE = s, M.FE.XS = 0, M.FE.SM = 1, M.FE.MD = 2, M.FE.LG = 3;
        M.FE.LinkRegExCommon = "[a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_.]{1,}", M.FE.LinkRegExEnd = "((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&amp;/~+#-\\'*-_{}]*)|())", M.FE.LinkRegExTLD = "((" + M.FE.LinkRegExCommon + ")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))", M.FE.LinkRegExHTTP = "((ftp|http|https):\\/\\/" + M.FE.LinkRegExCommon + ")", M.FE.LinkRegExAuth = "((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@" + M.FE.LinkRegExCommon + ")", M.FE.LinkRegExWWW = "(www\\." + M.FE.LinkRegExCommon + "\\.[a-z0-9-]{2,24})", M.FE.LinkRegEx = "(" + M.FE.LinkRegExTLD + "|" + M.FE.LinkRegExHTTP + "|" + M.FE.LinkRegExWWW + "|" + M.FE.LinkRegExAuth + ")" + M.FE.LinkRegExEnd, M.FE.LinkProtocols = ["mailto", "tel", "sms", "notes", "data"], M.FE.MAIL_REGEX = /.+@.+\..+/i, M.FE.MODULES.helpers = function(i) {
            function e() {
                var e, t, n = {},
                    r = (t = -1, "Microsoft Internet Explorer" == navigator.appName ? (e = navigator.userAgent, null !== new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e) && (t = parseFloat(RegExp.$1))) : "Netscape" == navigator.appName && (e = navigator.userAgent, null !== new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e) && (t = parseFloat(RegExp.$1))), t);
                if (0 < r) n.msie = !0;
                else {
                    var o = navigator.userAgent.toLowerCase(),
                        i = /(edge)[ \/]([\w.]+)/.exec(o) || /(chrome)[ \/]([\w.]+)/.exec(o) || /(webkit)[ \/]([\w.]+)/.exec(o) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(o) || /(msie) ([\w.]+)/.exec(o) || o.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(o) || [],
                        a = i[1] || "";
                    i[2];
                    i[1] && (n[a] = !0), n.chrome ? n.webkit = !0 : n.webkit && (n.safari = !0)
                }
                return n.msie && (n.version = r), n
            }
            function t() {
                return /(iPad|iPhone|iPod)/g.test(navigator.userAgent) && !o()
            }
            function n() {
                return /(Android)/g.test(navigator.userAgent) && !o()
            }
            function r() {
                return /(Blackberry)/g.test(navigator.userAgent)
            }
            function o() {
                return /(Windows Phone)/gi.test(navigator.userAgent)
            }
            function a(e) {
                return parseInt(e, 10) || 0
            }
            var s;
            var l = null;
            return {
                _init: function() {
                    i.browser = e(), function() {
                        function e(e, t) {
                            var i = e[t];
                            e[t] = function(e) {
                                var t, n = !1,
                                    r = !1;
                                if (e && e.match(s)) {
                                    e = e.replace(s, ""), this.parentNode || (a.appendChild(this), r = !0);
                                    var o = this.parentNode;
                                    return this.id || (this.id = "rootedQuerySelector_id_" + (new Date).getTime(), n = !0), t = i.call(o, "#" + this.id + " " + e), n && (this.id = ""), r && a.removeChild(this), t
                                }
                                return i.call(this, e)
                            }
                        }
                        var a = i.o_doc.createElement("div");
                        try {
                            a.querySelectorAll(":scope *")
                        } catch (t) {
                            var s = /^\s*:scope/gi;
                            e(Element.prototype, "querySelector"), e(Element.prototype, "querySelectorAll"), e(HTMLElement.prototype, "querySelector"), e(HTMLElement.prototype, "querySelectorAll")
                        }
                    }(), Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector), Element.prototype.closest || (Element.prototype.closest = function(e) {
                        var t = this;
                        if (!t) return null;
                        if (!document.documentElement.contains(this)) return null;
                        do {
                            if (t.matches(e)) return t;
                            t = t.parentElement
                        } while (null !== t);
                        return null
                    })
                },
                isIOS: t,
                isMac: function() {
                    return null == l && (l = 0 <= navigator.platform.toUpperCase().indexOf("MAC")), l
                },
                isAndroid: n,
                isBlackberry: r,
                isWindowsPhone: o,
                isMobile: function() {
                    return n() || t() || r()
                },
                isEmail: function(e) {
                    return !/^(https?:|ftps?:|)\/\//i.test(e) && M.FE.MAIL_REGEX.test(e)
                },
                requestAnimationFrame: function() {
                    return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame ||
                        function(e) {
                            window.setTimeout(e, 1e3 / 60)
                        }
                },
                getPX: a,
                screenSize: function() {
                    var e = M('<div class="fr-visibility-helper"></div>').appendTo("body:first");
                    try {
                        var t = a(e.css("margin-left"));
                        return e.remove(), t
                    } catch (n) {
                        return M.FE.LG
                    }
                },
                isTouch: function() {
                    return "ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch
                },
                sanitizeURL: function(e) {
                    return /^(https?:|ftps?:|)\/\//i.test(e) ? e : /^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e) ? e : new RegExp("^(" + M.FE.LinkProtocols.join("|") + "):\\/\\/", "i").test(e) ? e : e = encodeURIComponent(e).replace(/%23/g, "#").replace(/%2F/g, "/").replace(/%25/g, "%").replace(/mailto%3A/gi, "mailto:").replace(/file%3A/gi, "file:").replace(/sms%3A/gi, "sms:").replace(/tel%3A/gi, "tel:").replace(/notes%3A/gi, "notes:").replace(/data%3Aimage/gi, "data:image").replace(/blob%3A/gi, "blob:").replace(/webkit-fake-url%3A/gi, "webkit-fake-url:").replace(/%3F/g, "?").replace(/%3D/g, "=").replace(/%26/g, "&").replace(/&amp;/g, "&").replace(/%2C/g, ",").replace(/%3B/g, ";").replace(/%2B/g, "+").replace(/%40/g, "@").replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/%7B/g, "{").replace(/%7D/g, "}")
                },
                isArray: function(e) {
                    return e && !e.propertyIsEnumerable("length") && "object" == typeof e && "number" == typeof e.length
                },
                RGBToHex: function(e) {
                    function t(e) {
                        return ("0" + parseInt(e, 10).toString(16)).slice(-2)
                    }
                    try {
                        return e && "transparent" !== e ? /^#[0-9A-F]{6}$/i.test(e) ? e : ("#" + t((e = e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))[1]) + t(e[2]) + t(e[3])).toUpperCase() : ""
                    } catch (n) {
                        return null
                    }
                },
                HEXtoRGB: function(e) {
                    e = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(e, t, n, r) {
                        return t + t + n + n + r + r
                    });
                    var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
                    return t ? "rgb(" + parseInt(t[1], 16) + ", " + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) + ")" : ""
                },
                isURL: function(e) {
                    return !!/^(https?:|ftps?:|)\/\//i.test(e) && (e = String(e).replace(/</g, "%3C").replace(/>/g, "%3E").replace(/"/g, "%22").replace(/ /g, "%20"), new RegExp("^" + M.FE.LinkRegExHTTP + M.FE.LinkRegExEnd + "$", "gi").test(e))
                },
                getAlignment: function(e) {
                    var t = (e.css("text-align") || "").replace(/-(.*)-/g, "");
                    if (["left", "right", "justify", "center"].indexOf(t) < 0) {
                        if (!s) {
                            var n = M('<div dir="' + ("rtl" == i.opts.direction ? "rtl" : "auto") + '" style="text-align: ' + i.$el.css("text-align") + '; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>');
                            M("body:first").append(n);
                            var r = n.find("#s1").get(0).getBoundingClientRect().left,
                                o = n.find("#s2").get(0).getBoundingClientRect().left;
                            n.remove(), s = r < o ? "left" : "right"
                        }
                        t = s
                    }
                    return t
                },
                scrollTop: function() {
                    return i.o_win.pageYOffset ? i.o_win.pageYOffset : i.o_doc.documentElement && i.o_doc.documentElement.scrollTop ? i.o_doc.documentElement.scrollTop : i.o_doc.body.scrollTop ? i.o_doc.body.scrollTop : 0
                },
                scrollLeft: function() {
                    return i.o_win.pageXOffset ? i.o_win.pageXOffset : i.o_doc.documentElement && i.o_doc.documentElement.scrollLeft ? i.o_doc.documentElement.scrollLeft : i.o_doc.body.scrollLeft ? i.o_doc.body.scrollLeft : 0
                },
                isInViewPort: function(e) {
                    var t = e.getBoundingClientRect();
                    return 0 <= t.top && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) || t.top <= 0 && t.bottom >= (window.innerHeight || document.documentElement.clientHeight)
                }
            }
        }, M.FE.MODULES.events = function(s) {
            var e, a = {};

            function t(e, t, n) {
                f(e, t, n)
            }
            function n(e) {
                if (void 0 === e && (e = !0), !s.$wp) return !1;
                if (s.helpers.isIOS() && s.$win.get(0).focus(), s.core.hasFocus()) return !1;
                if (!s.core.hasFocus() && e) {
                    var t = s.$win.scrollTop();
                    if (s.browser.msie && s.$box && s.$box.css("position", "fixed"), s.browser.msie && s.$wp && s.$wp.css("overflow", "visible"), i(), s.$el.focus(), s.events.trigger("focus"), o(), s.browser.msie && s.$box && s.$box.css("position", ""), s.browser.msie && s.$wp && s.$wp.css("overflow", "auto"), t != s.$win.scrollTop() && s.$win.scrollTop(t), !s.selection.info(s.el).atStart) return !1
                }
                if (!s.core.hasFocus() || 0 < s.$el.find(".fr-marker").length) return !1;
                if (s.selection.info(s.el).atStart && s.selection.isCollapsed() && null != s.html.defaultTag()) {
                    var n = s.markers.insert();
                    if (n && !s.node.blockParent(n)) {
                        M(n).remove();
                        var r = s.$el.find(s.html.blockTagsQuery()).get(0);
                        r && (M(r).prepend(M.FE.MARKERS), s.selection.restore())
                    } else n && M(n).remove()
                }
            }
            var r = !1;

            function o() {
                e = !0
            }
            function i() {
                e = !1
            }
            function l() {
                return e
            }
            function d(e, t, n) {
                var r, o = e.split(" ");
                if (1 < o.length) {
                    for (var i = 0; i < o.length; i++) d(o[i], t, n);
                    return !0
                }
                void 0 === n && (n = !1), r = 0 !== e.indexOf("shared.") ? a[e] = a[e] || [] : s.shared._events[e] = s.shared._events[e] || [], n ? r.unshift(t) : r.push(t)
            }
            var c = [];

            function f(e, t, n, r, o) {
                "function" == typeof n && (o = r, r = n, n = !1);
                var i = o ? s.shared.$_events : c,
                    a = o ? s.sid : s.id;
                n ? e.on(t.split(" ").join(".ed" + a + " ") + ".ed" + a, n, r) : e.on(t.split(" ").join(".ed" + a + " ") + ".ed" + a, r), i.push([e, t.split(" ").join(".ed" + a + " ") + ".ed" + a])
            }
            function p(e) {
                for (var t = 0; t < e.length; t++) e[t][0].off(e[t][1])
            }
            function u(e, t, n) {
                if (!s.edit.isDisabled() || n) {
                    var r, o;
                    if (0 !== e.indexOf("shared.")) r = a[e];
                    else {
                        if (0 < s.shared.count) return !1;
                        r = s.shared._events[e]
                    }
                    if (r) for (var i = 0; i < r.length; i++) if (!1 === (o = r[i].apply(s, t))) return !1;
                    return !1 !== (o = s.$oel.triggerHandler("froalaEditor." + e, M.merge([s], t || []))) && o
                }
            }
            function g() {
                for (var e in a) a.hasOwnProperty(e) && delete a[e]
            }
            function h() {
                for (var e in s.shared._events) s.shared._events.hasOwnProperty(e) && delete s.shared._events[e]
            }
            return {
                _init: function() {
                    s.shared.$_events = s.shared.$_events || [], s.shared._events = {}, s.helpers.isMobile() ? (s._mousedown = "touchstart", s._mouseup = "touchend", s._move = "touchmove", s._mousemove = "touchmove") : (s._mousedown = "mousedown", s._mouseup = "mouseup", s._move = "", s._mousemove = "mousemove"), t(s.$el, "click mouseup mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart", function(e) {
                        u(e.type, [e])
                    }), d("mousedown", function() {
                        for (var e = 0; e < M.FE.INSTANCES.length; e++) M.FE.INSTANCES[e] != s && M.FE.INSTANCES[e].popups && M.FE.INSTANCES[e].popups.areVisible() && M.FE.INSTANCES[e].$el.find(".fr-marker").remove()
                    }), t(s.$win, s._mousedown, function(e) {
                        u("window.mousedown", [e]), o()
                    }), t(s.$win, s._mouseup, function(e) {
                        u("window.mouseup", [e])
                    }), t(s.$win, "cut copy keydown keyup touchmove touchend", function(e) {
                        u("window." + e.type, [e])
                    }), t(s.$doc, "dragend drop", function(e) {
                        u("document." + e.type, [e])
                    }), t(s.$el, "keydown keypress keyup input", function(e) {
                        u(e.type, [e])
                    }), t(s.$el, "focus", function(e) {
                        l() && (n(!1), !1 === r && u(e.type, [e]))
                    }), t(s.$el, "blur", function(e) {
                        l() && !0 === r && (u(e.type, [e]), o())
                    }), d("focus", function() {
                        r = !0
                    }), d("blur", function() {
                        r = !1
                    }), o(), t(s.$el, "cut copy paste beforepaste", function(e) {
                        u(e.type, [e])
                    }), d("destroy", g), d("shared.destroy", h)
                },
                on: d,
                trigger: u,
                bindClick: function(e, t, n) {
                    f(e, s._mousedown, t, function(e) {
                        var t, n;
                        s.edit.isDisabled() || (n = M((t = e).currentTarget), s.edit.isDisabled() || s.node.hasClass(n.get(0), "fr-disabled") ? t.preventDefault() : "mousedown" === t.type && 1 !== t.which || (s.helpers.isMobile() || t.preventDefault(), (s.helpers.isAndroid() || s.helpers.isWindowsPhone()) && 0 === n.parents(".fr-dropdown-menu").length && (t.preventDefault(), t.stopPropagation()), n.addClass("fr-selected"), s.events.trigger("commands.mousedown", [n])))
                    }, !0), f(e, s._mouseup + " " + s._move, t, function(e) {
                        s.edit.isDisabled() ||
                        function(e, t) {
                            var n = M(e.currentTarget);
                            if (s.edit.isDisabled() || s.node.hasClass(n.get(0), "fr-disabled")) return e.preventDefault();
                            if (("mouseup" !== e.type || 1 === e.which) && s.node.hasClass(n.get(0), "fr-selected")) if ("touchmove" != e.type) {
                                if (e.stopPropagation(), e.stopImmediatePropagation(), e.preventDefault(), !s.node.hasClass(n.get(0), "fr-selected")) return s.button.getButtons(".fr-selected", !0).removeClass("fr-selected");
                                if (s.button.getButtons(".fr-selected", !0).removeClass("fr-selected"), n.data("dragging") || n.attr("disabled")) return n.removeData("dragging");
                                var r = n.data("timeout");
                                r && (clearTimeout(r), n.removeData("timeout")), t.apply(s, [e])
                            } else n.data("timeout") || n.data("timeout", setTimeout(function() {
                                n.data("dragging", !0)
                            }, 100))
                        }(e, n)
                    }, !0), f(e, "mousedown click mouseup", t, function(e) {
                        s.edit.isDisabled() || e.stopPropagation()
                    }, !0), d("window.mouseup", function() {
                        s.edit.isDisabled() || (e.find(t).removeClass("fr-selected"), o())
                    })
                },
                disableBlur: i,
                enableBlur: o,
                blurActive: l,
                focus: n,
                chainTrigger: function(e, t, n) {
                    if (!s.edit.isDisabled() || n) {
                        var r, o;
                        if (0 !== e.indexOf("shared.")) r = a[e];
                        else {
                            if (0 < s.shared.count) return !1;
                            r = s.shared._events[e]
                        }
                        if (r) for (var i = 0; i < r.length; i++) void 0 !== (o = r[i].apply(s, [t])) && (t = o);
                        return void 0 !== (o = s.$oel.triggerHandler("froalaEditor." + e, M.merge([s], [t]))) && (t = o), t
                    }
                },
                $on: f,
                $off: function() {
                    p(c), c = [], 0 === s.shared.count && (p(s.shared.$_events), s.shared.$_events = [])
                }
            }
        }, M.FE.MODULES.node = function(a) {
            function s(e) {
                return e && "IFRAME" != e.tagName ? Array.prototype.slice.call(e.childNodes || []) : []
            }
            function l(e) {
                return !!e && (e.nodeType == Node.ELEMENT_NODE && 0 <= M.FE.BLOCK_TAGS.indexOf(e.tagName.toLowerCase()))
            }
            function d(e) {
                var t = {},
                    n = e.attributes;
                if (n) for (var r = 0; r < n.length; r++) {
                    var o = n[r];
                    t[o.nodeName] = o.value
                }
                return t
            }
            function t(e) {
                for (var t = "", n = d(e), r = Object.keys(n).sort(), o = 0; o < r.length; o++) {
                    var i = r[o],
                        a = n[i];
                    a.indexOf("'") < 0 && 0 <= a.indexOf('"') ? t += " " + i + "='" + a + "'" : 0 <= a.indexOf('"') && 0 <= a.indexOf("'") ? t += " " + i + '="' + (a = a.replace(/"/g, "&quot;")) + '"' : t += " " + i + '="' + a + '"'
                }
                return t
            }
            function n(e) {
                return e === a.el
            }
            return {
                isBlock: l,
                isEmpty: function(e, t) {
                    if (!e) return !0;
                    if (e.querySelector("table")) return !1;
                    var n = s(e);
                    1 == n.length && l(n[0]) && (n = s(n[0]));
                    for (var r = !1, o = 0; o < n.length; o++) {
                        var i = n[o];
                        if (!(t && a.node.hasClass(i, "fr-marker") || i.nodeType == Node.TEXT_NODE && 0 === i.textContent.length)) {
                            if ("BR" != i.tagName && 0 < (i.textContent || "").replace(/\u200B/gi, "").replace(/\n/g, "").length) return !1;
                            if (r) return !1;
                            "BR" == i.tagName && (r = !0)
                        }
                    }
                    return !(e.querySelectorAll(M.FE.VOID_ELEMENTS.join(",")).length - e.querySelectorAll("br").length || e.querySelector(a.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),") + ":not(.fr-marker)") || 1 < e.querySelectorAll(M.FE.BLOCK_TAGS.join(",")).length || e.querySelector(a.opts.htmlDoNotWrapTags.join(":not(.fr-marker),") + ":not(.fr-marker)"))
                },
                blockParent: function(e) {
                    for (; e && e.parentNode !== a.el && (!e.parentNode || !a.node.hasClass(e.parentNode, "fr-inner"));) if (l(e = e.parentNode)) return e;
                    return null
                },
                deepestParent: function(e, t, n) {
                    if (void 0 === t && (t = []), void 0 === n && (n = !0), t.push(a.el), 0 <= t.indexOf(e.parentNode) || e.parentNode && a.node.hasClass(e.parentNode, "fr-inner") || e.parentNode && 0 <= M.FE.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName) && n) return null;
                    for (; t.indexOf(e.parentNode) < 0 && e.parentNode && !a.node.hasClass(e.parentNode, "fr-inner") && (M.FE.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName) < 0 || !n) && (!l(e) || !l(e.parentNode) || !n);) e = e.parentNode;
                    return e
                },
                rawAttributes: d,
                attributes: t,
                clearAttributes: function(e) {
                    for (var t = e.attributes, n = t.length - 1; 0 <= n; n--) {
                        var r = t[n];
                        e.removeAttribute(r.nodeName)
                    }
                },
                openTagString: function(e) {
                    return "<" + e.tagName.toLowerCase() + t(e) + ">"
                },
                closeTagString: function(e) {
                    return "</" + e.tagName.toLowerCase() + ">"
                },
                isFirstSibling: function e(t, n) {
                    void 0 === n && (n = !0);
                    for (var r = t.previousSibling; r && n && a.node.hasClass(r, "fr-marker");) r = r.previousSibling;
                    return !r || r.nodeType == Node.TEXT_NODE && "" === r.textContent && e(r)
                },
                isLastSibling: function e(t, n) {
                    void 0 === n && (n = !0);
                    for (var r = t.nextSibling; r && n && a.node.hasClass(r, "fr-marker");) r = r.nextSibling;
                    return !r || r.nodeType == Node.TEXT_NODE && "" === r.textContent && e(r)
                },
                isList: function(e) {
                    return !!e && 0 <= ["UL", "OL"].indexOf(e.tagName)
                },
                isLink: function(e) {
                    return !!e && e.nodeType == Node.ELEMENT_NODE && "a" == e.tagName.toLowerCase()
                },
                isElement: n,
                contents: s,
                isVoid: function(e) {
                    return e && e.nodeType == Node.ELEMENT_NODE && 0 <= M.FE.VOID_ELEMENTS.indexOf((e.tagName || "").toLowerCase())
                },
                hasFocus: function(e) {
                    return e === a.doc.activeElement && (!a.doc.hasFocus || a.doc.hasFocus()) && !! (n(e) || e.type || e.href || ~e.tabIndex)
                },
                isEditable: function(e) {
                    return (!e.getAttribute || "false" != e.getAttribute("contenteditable")) && ["STYLE", "SCRIPT"].indexOf(e.tagName) < 0
                },
                isDeletable: function(e) {
                    return e && e.nodeType == Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= (e.getAttribute("class") || "").indexOf("fr-deletable")
                },
                hasClass: function(e, t) {
                    return e instanceof M && (e = e.get(0)), e && e.classList && e.classList.contains(t)
                },
                filter: function(e) {
                    return a.browser.msie ? e : {
                        acceptNode: e
                    }
                }
            }
        }, M.FE.INVISIBLE_SPACE = "&#8203;", M.FE.START_MARKER = '<span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;">' + M.FE.INVISIBLE_SPACE + "</span>", M.FE.END_MARKER = '<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;">' + M.FE.INVISIBLE_SPACE + "</span>", M.FE.MARKERS = M.FE.START_MARKER + M.FE.END_MARKER, M.FE.MODULES.markers = function(d) {
            function l() {
                if (!d.$wp) return null;
                try {
                    var e = d.selection.ranges(0),
                        t = e.commonAncestorContainer;
                    if (t != d.el && 0 === d.$el.find(t).length) return null;
                    var n = e.cloneRange(),
                        r = e.cloneRange();
                    n.collapse(!0);
                    var o = M('<span class="fr-marker" style="display: none; line-height: 0;">' + M.FE.INVISIBLE_SPACE + "</span>", d.doc)[0];
                    if (n.insertNode(o), o = d.$el.find("span.fr-marker").get(0)) {
                        for (var i = o.nextSibling; i && i.nodeType === Node.TEXT_NODE && 0 === i.textContent.length;) M(i).remove(), i = d.$el.find("span.fr-marker").get(0).nextSibling;
                        return d.selection.clear(), d.selection.get().addRange(r), o
                    }
                    return null
                } catch (a) {
                    console.warn("MARKER", a)
                }
            }
            function c() {
                d.$el.find(".fr-marker").remove()
            }
            return {
                place: function(e, t, n) {
                    var r, o, i;
                    try {
                        var a = e.cloneRange();
                        if (a.collapse(t), a.insertNode(M('<span class="fr-marker" data-id="' + n + '" data-type="' + t + '" style="display: ' + (d.browser.safari ? "none" : "inline-block") + '; line-height: 0;">' + M.FE.INVISIBLE_SPACE + "</span>", d.doc)[0]), !0 === t) for (i = (r = d.$el.find('span.fr-marker[data-type="true"][data-id="' + n + '"]').get(0)).nextSibling; i && i.nodeType === Node.TEXT_NODE && 0 === i.textContent.length;) M(i).remove(), i = r.nextSibling;
                        if (!0 === t && !e.collapsed) {
                            for (; !d.node.isElement(r.parentNode) && !i;) M(r.parentNode).after(r), i = r.nextSibling;
                            if (i && i.nodeType === Node.ELEMENT_NODE && d.node.isBlock(i) && "HR" !== i.tagName) {
                                for (o = [i]; i = o[0], (o = d.node.contents(i))[0] && d.node.isBlock(o[0]););
                                M(i).prepend(M(r))
                            }
                        }
                        if (!1 === t && !e.collapsed) {
                            if ((i = (r = d.$el.find('span.fr-marker[data-type="false"][data-id="' + n + '"]').get(0)).previousSibling) && i.nodeType === Node.ELEMENT_NODE && d.node.isBlock(i) && "HR" !== i.tagName) {
                                for (o = [i]; i = o[o.length - 1], (o = d.node.contents(i))[o.length - 1] && d.node.isBlock(o[o.length - 1]););
                                M(i).append(M(r))
                            }
                            r.parentNode && 0 <= ["TD", "TH"].indexOf(r.parentNode.tagName) && r.parentNode.previousSibling && !r.previousSibling && M(r.parentNode.previousSibling).append(r)
                        }
                        var s = d.$el.find('span.fr-marker[data-type="' + t + '"][data-id="' + n + '"]').get(0);
                        return s && (s.style.display = "none"), s
                    } catch (l) {
                        return null
                    }
                },
                insert: l,
                split: function() {
                    d.selection.isCollapsed() || d.selection.remove();
                    var e = d.$el.find(".fr-marker").get(0);
                    if (null == e && (e = l()), null == e) return null;
                    var t = d.node.deepestParent(e);
                    if (t || (t = d.node.blockParent(e)) && "LI" != t.tagName && (t = null), t) if (d.node.isBlock(t) && d.node.isEmpty(t))"LI" != t.tagName || t.parentNode.firstElementChild != t || d.node.isEmpty(t.parentNode) ? M(t).replaceWith('<span class="fr-marker"></span>') : M(t).append('<span class="fr-marker"></span>');
                    else if (d.cursor.isAtStart(e, t)) M(t).before('<span class="fr-marker"></span>'), M(e).remove();
                    else if (d.cursor.isAtEnd(e, t)) M(t).after('<span class="fr-marker"></span>'), M(e).remove();
                    else {
                        for (var n = e, r = "", o = ""; n = n.parentNode, r += d.node.closeTagString(n), o = d.node.openTagString(n) + o, n != t;);
                        M(e).replaceWith('<span id="fr-break"></span>');
                        var i = d.node.openTagString(t) + M(t).html() + d.node.closeTagString(t);
                        i = i.replace(/<span id="fr-break"><\/span>/g, r + '<span class="fr-marker"></span>' + o), M(t).replaceWith(i)
                    }
                    return d.$el.find(".fr-marker").get(0)
                },
                insertAtPoint: function(e) {
                    var t, n = e.clientX,
                        r = e.clientY;
                    c();
                    var o = null;
                    if ("undefined" != typeof d.doc.caretPositionFromPoint ? (t = d.doc.caretPositionFromPoint(n, r), (o = d.doc.createRange()).setStart(t.offsetNode, t.offset), o.setEnd(t.offsetNode, t.offset)) : "undefined" != typeof d.doc.caretRangeFromPoint && (t = d.doc.caretRangeFromPoint(n, r), (o = d.doc.createRange()).setStart(t.startContainer, t.startOffset), o.setEnd(t.startContainer, t.startOffset)), null !== o && "undefined" != typeof d.win.getSelection) {
                        var i = d.win.getSelection();
                        i.removeAllRanges(), i.addRange(o)
                    } else if ("undefined" != typeof d.doc.body.createTextRange) try {
                        (o = d.doc.body.createTextRange()).moveToPoint(n, r);
                        var a = o.duplicate();
                        a.moveToPoint(n, r), o.setEndPoint("EndToEnd", a), o.select()
                    } catch (s) {
                        return !1
                    }
                    l()
                },
                remove: c
            }
        }, M.FE.MODULES.selection = function(S) {
            function s() {
                var e = "";
                return S.win.getSelection ? e = S.win.getSelection() : S.doc.getSelection ? e = S.doc.getSelection() : S.doc.selection && (e = S.doc.selection.createRange().text), e.toString()
            }
            function T() {
                return S.win.getSelection ? S.win.getSelection() : S.doc.getSelection ? S.doc.getSelection() : S.doc.selection.createRange()
            }
            function c(e) {
                var t = T(),
                    n = [];
                if (t && t.getRangeAt && t.rangeCount) {
                    n = [];
                    for (var r = 0; r < t.rangeCount; r++) n.push(t.getRangeAt(r))
                } else n = S.doc.createRange ? [S.doc.createRange()] : [];
                return void 0 !== e ? n[e] : n
            }
            function y() {
                var e = T();
                try {
                    e.removeAllRanges ? e.removeAllRanges() : e.empty ? e.empty() : e.clear && e.clear()
                } catch (t) {}
            }
            function f(e, t) {
                var n = e;
                return n.nodeType == Node.ELEMENT_NODE && 0 < n.childNodes.length && n.childNodes[t] && (n = n.childNodes[t]), n.nodeType == Node.TEXT_NODE && (n = n.parentNode), n
            }
            function N() {
                if (S.$wp) {
                    S.markers.remove();
                    var e, t, n = c(),
                        r = [];
                    for (t = 0; t < n.length; t++) if (n[t].startContainer !== S.doc || S.browser.msie) {
                        var o = (e = n[t]).collapsed,
                            i = S.markers.place(e, !0, t),
                            a = S.markers.place(e, !1, t);
                        void 0 !== i && i || !o || (M(".fr-marker").remove(), S.selection.setAtEnd(S.el)), S.el.normalize(), S.browser.safari && !o && ((e = S.doc.createRange()).setStartAfter(i), e.setEndBefore(a), r.push(e))
                    }
                    if (S.browser.safari && r.length) for (S.selection.clear(), t = 0; t < r.length; t++) S.selection.get().addRange(r[t])
                }
            }
            function C() {
                var e, t = S.el.querySelectorAll('.fr-marker[data-type="true"]');
                if (!S.$wp) return S.markers.remove(), !1;
                if (0 === t.length) return !1;
                if (S.browser.msie || S.browser.edge) for (e = 0; e < t.length; e++) t[e].style.display = "inline-block";
                S.core.hasFocus() || S.browser.msie || S.browser.webkit || S.$el.focus(), y();
                var n = T();
                for (e = 0; e < t.length; e++) {
                    var r = M(t[e]).data("id"),
                        o = t[e],
                        i = S.doc.createRange(),
                        a = S.$el.find('.fr-marker[data-type="false"][data-id="' + r + '"]');
                    (S.browser.msie || S.browser.edge) && a.css("display", "inline-block");
                    var s = null;
                    if (0 < a.length) {
                        a = a[0];
                        try {
                            for (var l, d = !1, c = o.nextSibling; c && c.nodeType == Node.TEXT_NODE && 0 === c.textContent.length;) c = (l = c).nextSibling, M(l).remove();
                            for (var f, p, u = a.nextSibling; u && u.nodeType == Node.TEXT_NODE && 0 === u.textContent.length;) u = (l = u).nextSibling, M(l).remove();
                            if (o.nextSibling == a || a.nextSibling == o) {
                                for (var g = o.nextSibling == a ? o : a, h = g == o ? a : o, m = g.previousSibling; m && m.nodeType == Node.TEXT_NODE && 0 === m.length;) m = (l = m).previousSibling, M(l).remove();
                                if (m && m.nodeType == Node.TEXT_NODE) for (; m && m.previousSibling && m.previousSibling.nodeType == Node.TEXT_NODE;) m.previousSibling.textContent = m.previousSibling.textContent + m.textContent, m = m.previousSibling, M(m.nextSibling).remove();
                                for (var E = h.nextSibling; E && E.nodeType == Node.TEXT_NODE && 0 === E.length;) E = (l = E).nextSibling, M(l).remove();
                                if (E && E.nodeType == Node.TEXT_NODE) for (; E && E.nextSibling && E.nextSibling.nodeType == Node.TEXT_NODE;) E.nextSibling.textContent = E.textContent + E.nextSibling.textContent, E = E.nextSibling, M(E.previousSibling).remove();
                                if (m && (S.node.isVoid(m) || S.node.isBlock(m)) && (m = null), E && (S.node.isVoid(E) || S.node.isBlock(E)) && (E = null), m && E && m.nodeType == Node.TEXT_NODE && E.nodeType == Node.TEXT_NODE) {
                                    M(o).remove(), M(a).remove();
                                    var v = m.textContent.length;
                                    m.textContent = m.textContent + E.textContent, M(E).remove(), S.opts.htmlUntouched || S.spaces.normalize(m), i.setStart(m, v), i.setEnd(m, v), d = !0
                                } else!m && E && E.nodeType == Node.TEXT_NODE ? (M(o).remove(), M(a).remove(), S.opts.htmlUntouched || S.spaces.normalize(E), s = M(S.doc.createTextNode("​")), M(E).before(s), i.setStart(E, 0), i.setEnd(E, 0), d = !0) : !E && m && m.nodeType == Node.TEXT_NODE && (M(o).remove(), M(a).remove(), S.opts.htmlUntouched || S.spaces.normalize(m), s = M(S.doc.createTextNode("​")), M(m).after(s), i.setStart(m, m.textContent.length), i.setEnd(m, m.textContent.length), d = !0)
                            }
                            if (!d)(S.browser.chrome || S.browser.edge) && o.nextSibling == a ? (f = A(a, i, !0) || i.setStartAfter(a), p = A(o, i, !1) || i.setEndBefore(o)) : (o.previousSibling == a && (a = (o = a).nextSibling), a.nextSibling && "BR" === a.nextSibling.tagName || !a.nextSibling && S.node.isBlock(o.previousSibling) || o.previousSibling && "BR" == o.previousSibling.tagName || (o.style.display = "inline", a.style.display = "inline", s = M(S.doc.createTextNode("​"))), f = A(o, i, !0) || M(o).before(s) && i.setStartBefore(o), p = A(a, i, !1) || M(a).after(s) && i.setEndAfter(a)), "function" == typeof f && f(), "function" == typeof p && p()
                        } catch (b) {
                            console.warn("RESTORE RANGE", b)
                        }
                    }
                    s && s.remove();
                    try {
                        n.addRange(i)
                    } catch (b) {
                        console.warn("ADD RANGE", b)
                    }
                }
                S.markers.remove()
            }
            function A(e, t, n) {
                var r, o = e.previousSibling,
                    i = e.nextSibling;
                return o && i && o.nodeType == Node.TEXT_NODE && i.nodeType == Node.TEXT_NODE ? (r = o.textContent.length, n ? (i.textContent = o.textContent + i.textContent, M(o).remove(), M(e).remove(), S.opts.htmlUntouched || S.spaces.normalize(i), function() {
                    t.setStart(i, r)
                }) : (o.textContent = o.textContent + i.textContent, M(i).remove(), M(e).remove(), S.opts.htmlUntouched || S.spaces.normalize(o), function() {
                    t.setEnd(o, r)
                })) : o && !i && o.nodeType == Node.TEXT_NODE ? (r = o.textContent.length, n ? (S.opts.htmlUntouched || S.spaces.normalize(o), function() {
                    t.setStart(o, r)
                }) : (S.opts.htmlUntouched || S.spaces.normalize(o), function() {
                    t.setEnd(o, r)
                })) : !(!i || o || i.nodeType != Node.TEXT_NODE) && (n ? (S.opts.htmlUntouched || S.spaces.normalize(i), function() {
                    t.setStart(i, 0)
                }) : (S.opts.htmlUntouched || S.spaces.normalize(i), function() {
                    t.setEnd(i, 0)
                }))
            }
            function x() {
                for (var e = c(), t = 0; t < e.length; t++) if (!e[t].collapsed) return !1;
                return !0
            }
            function o(e) {
                var t, n, r = !1,
                    o = !1;
                if (S.win.getSelection) {
                    var i = S.win.getSelection();
                    i.rangeCount && ((n = (t = i.getRangeAt(0)).cloneRange()).selectNodeContents(e), n.setEnd(t.startContainer, t.startOffset), r = "" === n.toString(), n.selectNodeContents(e), n.setStart(t.endContainer, t.endOffset), o = "" === n.toString())
                } else S.doc.selection && "Control" != S.doc.selection.type && ((n = (t = S.doc.selection.createRange()).duplicate()).moveToElementText(e), n.setEndPoint("EndToStart", t), r = "" === n.text, n.moveToElementText(e), n.setEndPoint("StartToEnd", t), o = "" === n.text);
                return {
                    atStart: r,
                    atEnd: o
                }
            }
            function $(e, t) {
                void 0 === t && (t = !0);
                var n = M(e).html();
                n && n.replace(/\u200b/g, "").length != n.length && M(e).html(n.replace(/\u200b/g, ""));
                for (var r = S.node.contents(e), o = 0; o < r.length; o++) r[o].nodeType != Node.ELEMENT_NODE ? M(r[o]).remove() : ($(r[o], 0 === o), 0 === o && (t = !1));
                e.nodeType == Node.TEXT_NODE ? M(e).replaceWith('<span data-first="true" data-text="true"></span>') : t && M(e).attr("data-first", !0)
            }
            function O() {
                return 0 === M(this).find("fr-inner").length
            }
            function p() {
                try {
                    if (!S.$wp) return !1;
                    for (var e = c(0).commonAncestorContainer; e && !S.node.isElement(e);) e = e.parentNode;
                    return !!S.node.isElement(e)
                } catch (t) {
                    return !1
                }
            }
            function r(e, t) {
                if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1;
                for (var n = e.firstChild; n && (S.node.isBlock(n) || t && !S.node.isVoid(n) && n.nodeType == Node.ELEMENT_NODE);) n = (e = n).firstChild;
                e.innerHTML = M.FE.MARKERS + e.innerHTML
            }
            function i(e, t) {
                if (!e || 0 < e.getElementsByClassName("fr-marker").length) return !1;
                for (var n = e.lastChild; n && (S.node.isBlock(n) || t && !S.node.isVoid(n) && n.nodeType == Node.ELEMENT_NODE);) n = (e = n).lastChild;
                var r = S.doc.createElement("SPAN");
                r.setAttribute("id", "fr-sel-markers"), r.innerHTML = M.FE.MARKERS, e.appendChild(r);
                var o = e.querySelector("#fr-sel-markers");
                o.outerHTML = o.innerHTML
            }
            return {
                text: s,
                get: T,
                ranges: c,
                clear: y,
                element: function() {
                    var e = T();
                    try {
                        if (e.rangeCount) {
                            var t, n = c(0),
                                r = n.startContainer;
                            if (r.nodeType == Node.TEXT_NODE && n.startOffset == (r.textContent || "").length && r.nextSibling && (r = r.nextSibling), r.nodeType == Node.ELEMENT_NODE) {
                                var o = !1;
                                if (0 < r.childNodes.length && r.childNodes[n.startOffset]) {
                                    for (t = r.childNodes[n.startOffset]; t && t.nodeType == Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling;
                                    if (t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, o = !0), !o && 1 < r.childNodes.length && 0 < n.startOffset && r.childNodes[n.startOffset - 1]) {
                                        for (t = r.childNodes[n.startOffset - 1]; t && t.nodeType == Node.TEXT_NODE && 0 === t.textContent.length;) t = t.nextSibling;
                                        t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, o = !0)
                                    }
                                } else!n.collapsed && r.nextSibling && r.nextSibling.nodeType == Node.ELEMENT_NODE && (t = r.nextSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, o = !0);
                                !o && 0 < r.childNodes.length && M(r.childNodes[0]).text().replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && ["BR", "IMG", "HR"].indexOf(r.childNodes[0].tagName) < 0 && (r = r.childNodes[0])
                            }
                            for (; r.nodeType != Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode;
                            for (var i = r; i && "HTML" != i.tagName;) {
                                if (i == S.el) return r;
                                i = M(i).parent()[0]
                            }
                        }
                    } catch (a) {}
                    return S.el
                },
                endElement: function() {
                    var e = T();
                    try {
                        if (e.rangeCount) {
                            var t, n = c(0),
                                r = n.endContainer;
                            if (r.nodeType == Node.ELEMENT_NODE) {
                                var o = !1;
                                0 < r.childNodes.length && r.childNodes[n.endOffset] && M(r.childNodes[n.endOffset]).text() === s() ? (r = r.childNodes[n.endOffset], o = !0) : !n.collapsed && r.previousSibling && r.previousSibling.nodeType == Node.ELEMENT_NODE ? (t = r.previousSibling) && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, o = !0) : !n.collapsed && 0 < r.childNodes.length && r.childNodes[n.endOffset] && (t = r.childNodes[n.endOffset].previousSibling).nodeType == Node.ELEMENT_NODE && t && t.textContent.replace(/\u200B/g, "") === s().replace(/\u200B/g, "") && (r = t, o = !0), !o && 0 < r.childNodes.length && M(r.childNodes[r.childNodes.length - 1]).text() === s() && ["BR", "IMG", "HR"].indexOf(r.childNodes[r.childNodes.length - 1].tagName) < 0 && (r = r.childNodes[r.childNodes.length - 1])
                            }
                            for (r.nodeType == Node.TEXT_NODE && 0 === n.endOffset && r.previousSibling && r.previousSibling.nodeType == Node.ELEMENT_NODE && (r = r.previousSibling); r.nodeType != Node.ELEMENT_NODE && r.parentNode;) r = r.parentNode;
                            for (var i = r; i && "HTML" != i.tagName;) {
                                if (i == S.el) return r;
                                i = M(i).parent()[0]
                            }
                        }
                    } catch (a) {}
                    return S.el
                },
                save: N,
                restore: C,
                isCollapsed: x,
                isFull: function() {
                    if (x()) return !1;
                    S.selection.save();
                    var e, t = S.el.querySelectorAll("td, th, img, br");
                    for (e = 0; e < t.length; e++) t[e].nextSibling && (t[e].innerHTML = '<span class="fr-mk">' + M.FE.INVISIBLE_SPACE + "</span>" + t[e].innerHTML);
                    var n = !1,
                        r = o(S.el);
                    for (r.atStart && r.atEnd && (n = !0), t = S.el.querySelectorAll(".fr-mk"), e = 0; e < t.length; e++) t[e].parentNode.removeChild(t[e]);
                    return S.selection.restore(), n
                },
                inEditor: p,
                remove: function() {
                    if (x()) return !0;
                    var t;
                    N();
                    var n = function(e) {
                            for (var t = e.previousSibling; t && t.nodeType == Node.TEXT_NODE && 0 === t.textContent.length;) {
                                var n = t;
                                t = t.previousSibling, M(n).remove()
                            }
                            return t
                        },
                        r = function(e) {
                            for (var t = e.nextSibling; t && t.nodeType == Node.TEXT_NODE && 0 === t.textContent.length;) {
                                var n = t;
                                t = t.nextSibling, M(n).remove()
                            }
                            return t
                        },
                        o = S.$el.find('.fr-marker[data-type="true"]');
                    for (t = 0; t < o.length; t++) for (var i = o[t]; !(n(i) || S.node.isBlock(i.parentNode) || S.$el.is(i.parentNode) || S.node.hasClass(i.parentNode, "fr-inner"));) M(i.parentNode).before(i);
                    var a = S.$el.find('.fr-marker[data-type="false"]');
                    for (t = 0; t < a.length; t++) {
                        for (var s = a[t]; !(r(s) || S.node.isBlock(s.parentNode) || S.$el.is(s.parentNode) || S.node.hasClass(s.parentNode, "fr-inner"));) M(s.parentNode).after(s);
                        s.parentNode && S.node.isBlock(s.parentNode) && S.node.isEmpty(s.parentNode) && !S.$el.is(s.parentNode) && !S.node.hasClass(s.parentNode, "fr-inner") && S.opts.keepFormatOnDelete && M(s.parentNode).after(s)
                    }
                    if (function() {
                            for (var e = S.$el.find(".fr-marker"), t = 0; t < e.length; t++) if (M(e[t]).parentsUntil('.fr-element, [contenteditable="true"]', '[contenteditable="false"]').length) return !1;
                            return !0
                        }()) {
                        !
                            function e(t, n) {
                                var r = S.node.contents(t.get(0));
                                0 <= ["TD", "TH"].indexOf(t.get(0).tagName) && 1 == t.find(".fr-marker").length && S.node.hasClass(r[0], "fr-marker") && t.attr("data-del-cell", !0);
                                for (var o = 0; o < r.length; o++) {
                                    var i = r[o];
                                    S.node.hasClass(i, "fr-marker") ? n = (n + 1) % 2 : n ? 0 < M(i).find(".fr-marker").length ? n = e(M(i), n) : ["TD", "TH"].indexOf(i.tagName) < 0 && !S.node.hasClass(i, "fr-inner") ? !S.opts.keepFormatOnDelete || 0 < S.$el.find("[data-first]").length || S.node.isVoid(i) ? M(i).remove() : $(i) : S.node.hasClass(i, "fr-inner") ? 0 === M(i).find(".fr-inner").length ? M(i).html("<br>") : M(i).find(".fr-inner").filter(O).html("<br>") : (M(i).empty(), M(i).attr("data-del-cell", !0)) : 0 < M(i).find(".fr-marker").length && (n = e(M(i), n))
                                }
                                return n
                            }(S.$el, 0);
                        var l = S.$el.find('[data-first="true"]');
                        if (l.length) S.$el.find(".fr-marker").remove(), l.append(M.FE.INVISIBLE_SPACE + M.FE.MARKERS).removeAttr("data-first"), l.attr("data-text") && l.replaceWith(l.html());
                        else for (S.$el.find("table").filter(function() {
                            return 0 < M(this).find("[data-del-cell]").length && M(this).find("[data-del-cell]").length == M(this).find("td, th").length
                        }).remove(), S.$el.find("[data-del-cell]").removeAttr("data-del-cell"), o = S.$el.find('.fr-marker[data-type="true"]'), t = 0; t < o.length; t++) {
                            var d = o[t],
                                c = d.nextSibling,
                                f = S.$el.find('.fr-marker[data-type="false"][data-id="' + M(d).data("id") + '"]').get(0);
                            if (f) {
                                if (d && (!c || c != f)) {
                                    var p = S.node.blockParent(d),
                                        u = S.node.blockParent(f),
                                        g = !1,
                                        h = !1;
                                    if (p && 0 <= ["UL", "OL"].indexOf(p.tagName) && (g = !(p = null)), u && 0 <= ["UL", "OL"].indexOf(u.tagName) && (h = !(u = null)), M(d).after(f), p != u) if (null != p || g) if (null != u || h || 0 !== M(p).parentsUntil(S.$el, "table").length) p && u && 0 === M(p).parentsUntil(S.$el, "table").length && 0 === M(u).parentsUntil(S.$el, "table").length && 0 === M(p).find(u).length && 0 === M(u).find(p).length && (M(p).append(M(u).html()), M(u).remove());
                                    else {
                                        for (c = p; !c.nextSibling && c.parentNode != S.el;) c = c.parentNode;
                                        for (c = c.nextSibling; c && "BR" != c.tagName;) {
                                            var m = c.nextSibling;
                                            M(p).append(c), c = m
                                        }
                                        c && "BR" == c.tagName && M(c).remove()
                                    } else {
                                        var E = S.node.deepestParent(d);
                                        E ? (M(E).after(M(u).html()), M(u).remove()) : 0 === M(u).parentsUntil(S.$el, "table").length && (M(d).next().after(M(u).html()), M(u).remove())
                                    }
                                }
                            } else f = M(d).clone().attr("data-type", !1), M(d).after(f)
                        }
                    }
                    S.opts.keepFormatOnDelete || S.html.fillEmptyBlocks(), S.html.cleanEmptyTags(!0), S.opts.htmlUntouched || (S.clean.lists(), S.spaces.normalize());
                    var v = S.$el.find(".fr-marker:last").get(0),
                        b = S.$el.find(".fr-marker:first").get(0);
                    void 0 !== v && void 0 !== b && !v.nextSibling && b.previousSibling && "BR" == b.previousSibling.tagName && S.node.isElement(v.parentNode) && S.node.isElement(b.parentNode) && S.$el.append("<br>"), C()
                },
                blocks: function() {
                    var e, t = [],
                        n = T();
                    if (p() && n.rangeCount) {
                        var r = c();
                        for (e = 0; e < r.length; e++) {
                            var o, i = r[e],
                                a = f(i.startContainer, i.startOffset),
                                s = f(i.endContainer, i.endOffset);
                            (S.node.isBlock(a) || S.node.hasClass(a, "fr-inner")) && t.indexOf(a) < 0 && t.push(a), (o = S.node.blockParent(a)) && t.indexOf(o) < 0 && t.push(o);
                            for (var l = [], d = a; d !== s && d !== S.el;) l.indexOf(d) < 0 && d.children && d.children.length ? (l.push(d), d = d.children[0]) : d.nextSibling ? d = d.nextSibling : d.parentNode && (d = d.parentNode, l.push(d)), S.node.isBlock(d) && l.indexOf(d) < 0 && t.indexOf(d) < 0 && (d !== s || 0 < i.endOffset) && t.push(d);
                            S.node.isBlock(s) && t.indexOf(s) < 0 && 0 < i.endOffset && t.push(s), (o = S.node.blockParent(s)) && t.indexOf(o) < 0 && t.push(o)
                        }
                    }
                    for (e = t.length - 1; 0 < e; e--) M(t[e]).find(t).length && t.splice(e, 1);
                    return t
                },
                info: o,
                setAtEnd: i,
                setAtStart: r,
                setBefore: function(e, t) {
                    void 0 === t && (t = !0);
                    for (var n = e.previousSibling; n && n.nodeType == Node.TEXT_NODE && 0 === n.textContent.length;) n = n.previousSibling;
                    return n ? (S.node.isBlock(n) ? i(n) : "BR" == n.tagName ? M(n).before(M.FE.MARKERS) : M(n).after(M.FE.MARKERS), !0) : !! t && (S.node.isBlock(e) ? r(e) : M(e).before(M.FE.MARKERS), !0)
                },
                setAfter: function(e, t) {
                    void 0 === t && (t = !0);
                    for (var n = e.nextSibling; n && n.nodeType == Node.TEXT_NODE && 0 === n.textContent.length;) n = n.nextSibling;
                    return n ? (S.node.isBlock(n) ? r(n) : M(n).before(M.FE.MARKERS), !0) : !! t && (S.node.isBlock(e) ? i(e) : M(e).after(M.FE.MARKERS), !0)
                },
                rangeElement: f
            }
        }, M.extend(M.FE.DEFAULTS, {
            htmlAllowedTags: ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "queue", "rp", "rt", "ruby", "s", "samp", "script", "style", "section", "select", "small", "source", "span", "strike", "strong", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "var", "video", "wbr"],
            htmlRemoveTags: ["script", "style"],
            htmlAllowedAttrs: ["accept", "accept-charset", "accesskey", "action", "align", "allowfullscreen", "allowtransparency", "alt", "async", "autocomplete", "autofocus", "autoplay", "autosave", "background", "bgcolor", "border", "charset", "cellpadding", "cellspacing", "checked", "cite", "class", "color", "cols", "colspan", "content", "contenteditable", "contextmenu", "controls", "coords", "data", "data-.*", "datetime", "default", "defer", "dir", "dirname", "disabled", "download", "draggable", "dropzone", "enctype", "for", "form", "formaction", "frameborder", "headers", "height", "hidden", "high", "href", "hreflang", "http-equiv", "icon", "id", "ismap", "itemprop", "keytype", "kind", "label", "lang", "language", "list", "loop", "low", "max", "maxlength", "media", "method", "min", "mozallowfullscreen", "multiple", "muted", "name", "novalidate", "open", "optimum", "pattern", "ping", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "reversed", "rows", "rowspan", "sandbox", "scope", "scoped", "scrolling", "seamless", "selected", "shape", "size", "sizes", "span", "src", "srcdoc", "srclang", "srcset", "start", "step", "summary", "spellcheck", "style", "tabindex", "target", "title", "type", "translate", "usemap", "value", "valign", "webkitallowfullscreen", "width", "wrap"],
            htmlAllowedStyleProps: [".*"],
            htmlAllowComments: !0,
            htmlUntouched: !1,
            fullPage: !1
        }), M.FE.HTML5Map = {
            B: "STRONG",
            I: "EM",
            STRIKE: "S"
        }, M.FE.MODULES.clean = function(c) {
            var f, p, u, g;

            function o(e) {
                if (e.nodeType == Node.ELEMENT_NODE && e.getAttribute("class") && 0 <= e.getAttribute("class").indexOf("fr-marker")) return !1;
                var t, n = c.node.contents(e),
                    r = [];
                for (t = 0; t < n.length; t++) n[t].nodeType != Node.ELEMENT_NODE || c.node.isVoid(n[t]) ? n[t].nodeType == Node.TEXT_NODE && (n[t].textContent = n[t].textContent.replace(/\u200b/g, "")) : n[t].textContent.replace(/\u200b/g, "").length != n[t].textContent.length && o(n[t]);
                if (e.nodeType == Node.ELEMENT_NODE && !c.node.isVoid(e) && (e.normalize(), n = c.node.contents(e), r = e.querySelectorAll(".fr-marker"), n.length - r.length == 0)) {
                    for (t = 0; t < n.length; t++) if (n[t].nodeType == Node.ELEMENT_NODE && (n[t].getAttribute("class") || "").indexOf("fr-marker") < 0) return !1;
                    for (t = 0; t < r.length; t++) e.parentNode.insertBefore(r[t].cloneNode(!0), e);
                    return e.parentNode.removeChild(e), !1
                }
            }
            function s(e, t) {
                if (e.nodeType == Node.COMMENT_NODE) return "\x3c!--" + e.nodeValue + "--\x3e";
                if (e.nodeType == Node.TEXT_NODE) return t ? e.textContent.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;") : e.textContent.replace(/\&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\u00A0/g, "&nbsp;").replace(/\u0009/g, "");
                if (e.nodeType != Node.ELEMENT_NODE) return e.outerHTML;
                if (e.nodeType == Node.ELEMENT_NODE && 0 <= ["STYLE", "SCRIPT", "NOSCRIPT"].indexOf(e.tagName)) return e.outerHTML;
                if (e.nodeType == Node.ELEMENT_NODE && "svg" == e.tagName) {
                    var n = document.createElement("div"),
                        r = e.cloneNode(!0);
                    return n.appendChild(r), n.innerHTML
                }
                if ("IFRAME" == e.tagName) return e.outerHTML.replace(/\&lt;/g, "<").replace(/\&gt;/g, ">");
                var o = e.childNodes;
                if (0 === o.length) return e.outerHTML;
                for (var i = "", a = 0; a < o.length; a++)"PRE" == e.tagName && (t = !0), i += s(o[a], t);
                return c.node.openTagString(e) + i + c.node.closeTagString(e)
            }
            var a = [];

            function h(e) {
                var t = e.replace(/;;/gi, ";");
                return ";" != (t = t.replace(/^;/gi, "")).charAt(t.length) && (t += ";"), t
            }
            function l(e) {
                var t;
                for (t in e) if (e.hasOwnProperty(t)) {
                    var n = t.match(u),
                        r = null;
                    "style" == t && c.opts.htmlAllowedStyleProps.length && (r = e[t].match(g)), n && r ? e[t] = h(r.join(";")) : n && ("style" != t || r) || delete e[t]
                }
                for (var o = "", i = Object.keys(e).sort(), a = 0; a < i.length; a++) e[t = i[a]].indexOf('"') < 0 ? o += " " + t + '="' + e[t] + '"' : o += " " + t + "='" + e[t] + "'";
                return o
            }
            function d(e, t) {
                var n, r = document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");
                M(r).append(e);
                var o = "";
                if (r) {
                    var i = c.node.contents(r);
                    for (n = 0; n < i.length; n++) t(i[n]);
                    for (i = c.node.contents(r), n = 0; n < i.length; n++) o += s(i[n])
                }
                return o
            }
            function m(e, t, n) {
                a = [];
                var r = e = e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, function(e) {
                        return a.push(e), "[FROALA.EDITOR.SCRIPT " + (a.length - 1) + "]"
                    }).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi, function(e) {
                        return a.push(e), "[FROALA.EDITOR.NOSCRIPT " + (a.length - 1) + "]"
                    }).replace(/<img((?:[\w\W]*?)) src="/g, '<img$1 data-fr-src="'),
                    o = null;
                c.opts.fullPage && (r = c.html.extractNode(e, "body") || (0 <= e.indexOf("<body") ? "" : e), n && (o = c.html.extractNode(e, "head") || "")), r = d(r, t), o && (o = d(o, t));
                var i = function(e, t, n) {
                    if (c.opts.fullPage) {
                        var r = c.html.extractDoctype(n),
                            o = l(c.html.extractNodeAttrs(n, "html"));
                        return t = null == t ? c.html.extractNode(n, "head") || "<title></title>" : t, r + "<html" + o + "><head" + l(c.html.extractNodeAttrs(n, "head")) + ">" + t + "</head><body" + l(c.html.extractNodeAttrs(n, "body")) + ">" + e + "</body></html>"
                    }
                    return e
                }(r, o, e);
                return i.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi, function(e, t) {
                    return 0 <= c.opts.htmlRemoveTags.indexOf("script") ? "" : a[parseInt(t, 10)]
                }).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi, function(e, t) {
                    return 0 <= c.opts.htmlRemoveTags.indexOf("noscript") ? "" : a[parseInt(t, 10)].replace(/\&lt;/g, "<").replace(/\&gt;/g, ">")
                }).replace(/<img((?:[\w\W]*?)) data-fr-src="/g, '<img$1 src="')
            }
            function E(e) {
                var t = c.doc.createElement("DIV");
                return t.innerText = e, t.textContent
            }
            function v(e) {
                for (var t = c.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType != Node.TEXT_NODE && v(t[n]);
                !
                    function(e) {
                        if ("SPAN" == e.tagName && 0 <= (e.getAttribute("class") || "").indexOf("fr-marker")) return;
                        var t, n;
                        if ("PRE" == e.tagName && 0 <= (n = (t = e).innerHTML).indexOf("\n") && (t.innerHTML = n.replace(/\n/g, "<br>")), e.nodeType == Node.ELEMENT_NODE && (e.getAttribute("data-fr-src") && 0 !== e.getAttribute("data-fr-src").indexOf("blob:") && e.setAttribute("data-fr-src", c.helpers.sanitizeURL(E(e.getAttribute("data-fr-src")))), e.getAttribute("href") && e.setAttribute("href", c.helpers.sanitizeURL(E(e.getAttribute("href")))), e.getAttribute("src") && e.setAttribute("src", c.helpers.sanitizeURL(E(e.getAttribute("src")))), 0 <= ["TABLE", "TBODY", "TFOOT", "TR"].indexOf(e.tagName) && (e.innerHTML = e.innerHTML.trim())), !c.opts.pasteAllowLocalImages && e.nodeType == Node.ELEMENT_NODE && "IMG" == e.tagName && e.getAttribute("data-fr-src") && 0 === e.getAttribute("data-fr-src").indexOf("file://")) return e.parentNode.removeChild(e);
                        if (e.nodeType == Node.ELEMENT_NODE && M.FE.HTML5Map[e.tagName] && "" === c.node.attributes(e)) {
                            var r = M.FE.HTML5Map[e.tagName],
                                o = "<" + r + ">" + e.innerHTML + "</" + r + ">";
                            e.insertAdjacentHTML("beforebegin", o), (e = e.previousSibling).parentNode.removeChild(e.nextSibling)
                        }
                        if (c.opts.htmlAllowComments || e.nodeType != Node.COMMENT_NODE) if (e.tagName && e.tagName.match(p)) e.parentNode.removeChild(e);
                        else if (e.tagName && !e.tagName.match(f))"svg" === e.tagName ? e.parentNode.removeChild(e) : c.browser.safari && "path" == e.tagName && e.parentNode && "svg" == e.parentNode.tagName || (e.outerHTML = e.innerHTML);
                        else {
                            var i = e.attributes;
                            if (i) for (var a = i.length - 1; 0 <= a; a--) {
                                var s = i[a],
                                    l = s.nodeName.match(u),
                                    d = null;
                                "style" == s.nodeName && c.opts.htmlAllowedStyleProps.length && (d = s.value.match(g)), l && d ? s.value = h(d.join(";")) : l && ("style" != s.nodeName || d) || e.removeAttribute(s.nodeName)
                            }
                        } else 0 !== e.data.indexOf("[FROALA.EDITOR") && e.parentNode.removeChild(e)
                    }(e)
            }
            return {
                _init: function() {
                    c.opts.fullPage && M.merge(c.opts.htmlAllowedTags, ["head", "title", "style", "link", "base", "body", "html", "meta"])
                },
                html: function(e, t, n, r) {
                    void 0 === t && (t = []), void 0 === n && (n = []), void 0 === r && (r = !1);
                    var o, i = M.merge([], c.opts.htmlAllowedTags);
                    for (o = 0; o < t.length; o++) 0 <= i.indexOf(t[o]) && i.splice(i.indexOf(t[o]), 1);
                    var a = M.merge([], c.opts.htmlAllowedAttrs);
                    for (o = 0; o < n.length; o++) 0 <= a.indexOf(n[o]) && a.splice(a.indexOf(n[o]), 1);
                    return a.push("data-fr-.*"), a.push("fr-.*"), f = new RegExp("^" + i.join("$|^") + "$", "gi"), u = new RegExp("^" + a.join("$|^") + "$", "gi"), p = new RegExp("^" + c.opts.htmlRemoveTags.join("$|^") + "$", "gi"), g = c.opts.htmlAllowedStyleProps.length ? new RegExp("((^|;|\\s)" + c.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)") + ":.+?(?=(;)|$))", "gi") : null, e = m(e, v, !0)
                },
                toHTML5: function() {
                    var e = c.el.querySelectorAll(Object.keys(M.FE.HTML5Map).join(","));
                    if (e.length) {
                        var t = !1;
                        c.el.querySelector(".fr-marker") || (c.selection.save(), t = !0);
                        for (var n = 0; n < e.length; n++)"" === c.node.attributes(e[n]) && M(e[n]).replaceWith("<" + M.FE.HTML5Map[e[n].tagName] + ">" + e[n].innerHTML + "</" + M.FE.HTML5Map[e[n].tagName] + ">");
                        t && c.selection.restore()
                    }
                },
                tables: function() {
                    !
                        function() {
                            for (var e = c.el.querySelectorAll("tr"), t = 0; t < e.length; t++) {
                                for (var n = e[t].children, r = !0, o = 0; o < n.length; o++) if ("TH" != n[o].tagName) {
                                    r = !1;
                                    break
                                }
                                if (!1 !== r && 0 !== n.length) {
                                    for (var i = e[t]; i && "TABLE" != i.tagName && "THEAD" != i.tagName;) i = i.parentNode;
                                    var a = i;
                                    "THEAD" != a.tagName && (a = c.doc.createElement("THEAD"), i.insertBefore(a, i.firstChild)), a.appendChild(e[t])
                                }
                            }
                        }()
                },
                lists: function() {
                    !
                        function() {
                            var e, t = [];
                            do {
                                if (t.length) {
                                    var n = t[0],
                                        r = c.doc.createElement("ul");
                                    n.parentNode.insertBefore(r, n);
                                    do {
                                        var o = n;
                                        n = n.nextSibling, r.appendChild(o)
                                    } while (n && "LI" == n.tagName)
                                }
                                t = [];
                                for (var i = c.el.querySelectorAll("li"), a = 0; a < i.length; a++) e = i[a], c.node.isList(e.parentNode) || t.push(i[a])
                            } while (0 < t.length)
                        }(), function() {
                        for (var e = c.el.querySelectorAll("ol + ol, ul + ul"), t = 0; t < e.length; t++) {
                            var n = e[t];
                            if (c.node.isList(n.previousSibling) && c.node.openTagString(n) == c.node.openTagString(n.previousSibling)) {
                                for (var r = c.node.contents(n), o = 0; o < r.length; o++) n.previousSibling.appendChild(r[o]);
                                n.parentNode.removeChild(n)
                            }
                        }
                    }(), function() {
                        for (var e = c.el.querySelectorAll("ul, ol"), t = 0; t < e.length; t++) for (var n = c.node.contents(e[t]), r = null, o = n.length - 1; 0 <= o; o--)"LI" != n[o].tagName ? (r || (r = M("<li>")).insertBefore(n[o]), r.prepend(n[o])) : r = null
                    }(), function() {
                        var e, t, n;
                        do {
                            t = !1;
                            var r = c.el.querySelectorAll("li:empty");
                            for (e = 0; e < r.length; e++) r[e].parentNode.removeChild(r[e]);
                            var o = c.el.querySelectorAll("ul, ol");
                            for (e = 0; e < o.length; e++)(n = o[e]).querySelector("LI") || (t = !0, n.parentNode.removeChild(n))
                        } while (!0 === t)
                    }(), function() {
                        for (var e = c.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"), t = 0; t < e.length; t++) {
                            var n = e[t],
                                r = n.previousSibling;
                            r && ("LI" == r.tagName ? r.appendChild(n) : M(n).wrap("<li></li>"))
                        }
                    }(), function() {
                        for (var e = c.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) {
                            var n = e[t];
                            if (n.nextSibling) {
                                var r = n.nextSibling,
                                    o = M("<li>");
                                M(n.parentNode).after(o);
                                do {
                                    var i = r;
                                    r = r.nextSibling, o.append(i)
                                } while (r)
                            }
                        }
                    }(), function() {
                        for (var e = c.el.querySelectorAll("li > ul, li > ol"), t = 0; t < e.length; t++) {
                            var n = e[t];
                            if (c.node.isFirstSibling(n)) M(n).before("<br/>");
                            else if (n.previousSibling && "BR" == n.previousSibling.tagName) {
                                for (var r = n.previousSibling.previousSibling; r && c.node.hasClass(r, "fr-marker");) r = r.previousSibling;
                                r && "BR" != r.tagName && M(n.previousSibling).remove()
                            }
                        }
                    }(), function() {
                        for (var e = c.el.querySelectorAll("li:empty"), t = 0; t < e.length; t++) M(e[t]).remove()
                    }()
                },
                invisibleSpaces: function(e) {
                    return e.replace(/\u200b/g, "").length == e.length ? e : c.clean.exec(e, o)
                },
                exec: m
            }
        }, M.FE.MODULES.spaces = function(l) {
            function r(e, t) {
                var n = e.previousSibling,
                    r = e.nextSibling,
                    o = e.textContent,
                    i = e.parentNode;
                if (!l.html.isPreformatted(i)) {
                    t && (o = o.replace(/[\f\n\r\t\v ]{2,}/g, " "), r && "BR" !== r.tagName && !l.node.isBlock(r) || !(l.node.isBlock(i) || l.node.isLink(i) && !i.nextSibling || l.node.isElement(i)) || (o = o.replace(/[\f\n\r\t\v ]{1,}$/g, "")), n && "BR" !== n.tagName && !l.node.isBlock(n) || !(l.node.isBlock(i) || l.node.isLink(i) && !i.previousSibling || l.node.isElement(i)) || (o = o.replace(/^[\f\n\r\t\v ]{1,}/g, "")), " " === o && (n && l.node.isVoid(n) || r && l.node.isVoid(r)) && (o = "")), (!n && l.node.isBlock(r) || !r && l.node.isBlock(n)) && l.node.isBlock(i) && (o = o.replace(/^[\f\n\r\t\v ]{1,}/g, "")), t || (o = o.replace(new RegExp(M.FE.UNICODE_NBSP, "g"), " "));
                    for (var a = "", s = 0; s < o.length; s++) 32 != o.charCodeAt(s) || 0 !== s && 32 != a.charCodeAt(s - 1) ? a += o[s] : a += M.FE.UNICODE_NBSP;
                    (!r || r && l.node.isBlock(r) || r && r.nodeType == Node.ELEMENT_NODE && l.win.getComputedStyle(r) && "block" == l.win.getComputedStyle(r).display) && (a = a.replace(/ $/, M.FE.UNICODE_NBSP)), !n || l.node.isVoid(n) || l.node.isBlock(n) || 1 !== (a = a.replace(/^\u00A0([^ $])/, " $1")).length || 160 !== a.charCodeAt(0) || !r || l.node.isVoid(r) || l.node.isBlock(r) || (a = " "), t || (a = a.replace(/([^ \u00A0])\u00A0([^ \u00A0])/g, "$1 $2")), e.textContent != a && (e.textContent = a)
                }
            }
            function d(e, t) {
                if (void 0 !== e && e || (e = l.el), void 0 === t && (t = !1), !e.getAttribute || "false" != e.getAttribute("contenteditable")) if (e.nodeType == Node.TEXT_NODE) r(e, t);
                else if (e.nodeType == Node.ELEMENT_NODE) for (var n = l.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, l.node.filter(function(e) {
                    for (var t = e.parentNode; t && t !== l.el;) {
                        if ("STYLE" == t.tagName || "IFRAME" == t.tagName) return !1;
                        if ("PRE" === t.tagName) return !1;
                        t = t.parentNode
                    }
                    return null != e.textContent.match(/([ \u00A0\f\n\r\t\v]{2,})|(^[ \u00A0\f\n\r\t\v]{1,})|([ \u00A0\f\n\r\t\v]{1,}$)/g) && !l.node.hasClass(e.parentNode, "fr-marker")
                }), !1); n.nextNode();) r(n.currentNode, t)
            }
            return {
                normalize: d,
                normalizeAroundCursor: function() {
                    for (var e = [], t = l.el.querySelectorAll(".fr-marker"), n = 0; n < t.length; n++) {
                        for (var r = null, o = l.node.blockParent(t[n]), i = (r = o || t[n]).nextSibling, a = r.previousSibling; i && "BR" == i.tagName;) i = i.nextSibling;
                        for (; a && "BR" == a.tagName;) a = a.previousSibling;
                        r && e.indexOf(r) < 0 && e.push(r), a && e.indexOf(a) < 0 && e.push(a), i && e.indexOf(i) < 0 && e.push(i)
                    }
                    for (var s = 0; s < e.length; s++) d(e[s])
                }
            }
        }, M.FE.UNICODE_NBSP = String.fromCharCode(160), M.FE.VOID_ELEMENTS = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"], M.FE.BLOCK_TAGS = ["address", "article", "aside", "audio", "blockquote", "canvas", "details", "dd", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "li", "main", "nav", "noscript", "ol", "output", "p", "pre", "section", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "ul", "video"], M.extend(M.FE.DEFAULTS, {
            htmlAllowedEmptyTags: ["textarea", "a", "iframe", "object", "video", "style", "script", ".fa", ".fr-emoticon", ".fr-inner", "path", "line"],
            htmlDoNotWrapTags: ["script", "style"],
            htmlSimpleAmpersand: !1,
            htmlIgnoreCSSProperties: [],
            htmlExecuteScripts: !0
        }), M.FE.MODULES.html = function(O) {
            function c() {
                return O.opts.enter == M.FE.ENTER_P ? "p" : O.opts.enter == M.FE.ENTER_DIV ? "div" : O.opts.enter == M.FE.ENTER_BR ? null : void 0
            }
            function s(e, t) {
                return !(!e || e === O.el) && (t ? -1 != ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName) || s(e.parentNode, t) : -1 != ["PRE", "SCRIPT", "STYLE"].indexOf(e.tagName))
            }
            function i(e) {
                var t, n = [],
                    r = [];
                if (e) {
                    var o = O.el.querySelectorAll(".fr-marker");
                    for (t = 0; t < o.length; t++) {
                        var i = O.node.blockParent(o[t]) || o[t];
                        if (i) {
                            var a = i.nextSibling,
                                s = i.previousSibling;
                            i && r.indexOf(i) < 0 && O.node.isBlock(i) && r.push(i), s && O.node.isBlock(s) && r.indexOf(s) < 0 && r.push(s), a && O.node.isBlock(a) && r.indexOf(a) < 0 && r.push(a)
                        }
                    }
                } else r = O.el.querySelectorAll(p());
                var l = p();
                for (l += "," + M.FE.VOID_ELEMENTS.join(","), l += ", .fr-inner", l += "," + O.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),") + ":not(.fr-marker)", t = r.length - 1; 0 <= t; t--) if (!(r[t].textContent && 0 < r[t].textContent.replace(/\u200B|\n/g, "").length || 0 < r[t].querySelectorAll(l).length)) {
                    for (var d = O.node.contents(r[t]), c = !1, f = 0; f < d.length; f++) if (d[f].nodeType != Node.COMMENT_NODE && d[f].textContent && 0 < d[f].textContent.replace(/\u200B|\n/g, "").length) {
                        c = !0;
                        break
                    }
                    c || n.push(r[t])
                }
                return n
            }
            function p() {
                return M.FE.BLOCK_TAGS.join(", ")
            }
            function e(e) {
                var t, n, r = M.merge([], M.FE.VOID_ELEMENTS);
                r = M.merge(r, O.opts.htmlAllowedEmptyTags), r = void 0 === e ? M.merge(r, M.FE.BLOCK_TAGS) : M.merge(r, M.FE.NO_DELETE_TAGS), t = O.el.querySelectorAll("*:empty:not(" + r.join("):not(") + "):not(.fr-marker)");
                do {
                    n = !1;
                    for (var o = 0; o < t.length; o++) 0 !== t[o].attributes.length && void 0 === t[o].getAttribute("href") || (t[o].parentNode.removeChild(t[o]), n = !0);
                    t = O.el.querySelectorAll("*:empty:not(" + r.join("):not(") + "):not(.fr-marker)")
                } while (t.length && n)
            }
            function a(e, t) {
                var n = c();
                if (t && (n = "div"), n) {
                    for (var r = O.doc.createDocumentFragment(), o = null, i = !1, a = e.firstChild, s = !1; a;) {
                        var l = a.nextSibling;
                        if (a.nodeType == Node.ELEMENT_NODE && (O.node.isBlock(a) || 0 <= O.opts.htmlDoNotWrapTags.indexOf(a.tagName.toLowerCase()) && !O.node.hasClass(a, "fr-marker"))) o = null, r.appendChild(a.cloneNode(!0));
                        else if (a.nodeType != Node.ELEMENT_NODE && a.nodeType != Node.TEXT_NODE) o = null, r.appendChild(a.cloneNode(!0));
                        else if ("BR" == a.tagName) null == o ? (o = O.doc.createElement(n), s = !0, t && (o.setAttribute("class", "fr-temp-div"), o.setAttribute("data-empty", !0)), o.appendChild(a.cloneNode(!0)), r.appendChild(o)) : !1 === i && (o.appendChild(O.doc.createElement("br")), t && (o.setAttribute("class", "fr-temp-div"), o.setAttribute("data-empty", !0))), o = null;
                        else {
                            var d = a.textContent;
                            (a.nodeType !== Node.TEXT_NODE || 0 < d.replace(/\n/g, "").replace(/(^ *)|( *$)/g, "").length || d.length && d.indexOf("\n") < 0) && (null == o && (o = O.doc.createElement(n), s = !0, t && o.setAttribute("class", "fr-temp-div"), r.appendChild(o), i = !1), o.appendChild(a.cloneNode(!0)), i || O.node.hasClass(a, "fr-marker") || a.nodeType == Node.TEXT_NODE && 0 === d.replace(/ /g, "").length || (i = !0))
                        }
                        a = l
                    }
                    s && (e.innerHTML = "", e.appendChild(r))
                }
            }
            function l(e, t) {
                for (var n = e.length - 1; 0 <= n; n--) a(e[n], t)
            }
            function t(e, t, n, r, o) {
                if (!O.$wp) return !1;
                void 0 === e && (e = !1), void 0 === t && (t = !1), void 0 === n && (n = !1), void 0 === r && (r = !1), void 0 === o && (o = !1);
                var i = O.$wp.scrollTop();
                a(O.el, e), r && l(O.el.querySelectorAll(".fr-inner"), e), t && l(O.el.querySelectorAll("td, th"), e), n && l(O.el.querySelectorAll("blockquote"), e), o && l(O.el.querySelectorAll("li"), e), i != O.$wp.scrollTop() && O.$wp.scrollTop(i)
            }
            function n(e) {
                if (void 0 === e && (e = O.el), e && 0 <= ["SCRIPT", "STYLE", "PRE"].indexOf(e.tagName)) return !1;
                for (var t = O.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, O.node.filter(function(e) {
                    return null != e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g)
                }), !1); t.nextNode();) {
                    var n = t.currentNode;
                    if (!s(n.parentNode, !0)) {
                        var r = O.node.isBlock(n.parentNode) || O.node.isElement(n.parentNode),
                            o = n.textContent.replace(/(?!^)( ){2,}(?!$)/g, " ").replace(/\n/g, " ").replace(/^[ ]{2,}/g, " ").replace(/[ ]{2,}$/g, " ");
                        if (r) {
                            var i = n.previousSibling,
                                a = n.nextSibling;
                            i && a && " " == o ? o = O.node.isBlock(i) && O.node.isBlock(a) ? "" : " " : (i || (o = o.replace(/^ */, "")), a || (o = o.replace(/ *$/, "")))
                        }
                        n.textContent = o
                    }
                }
            }
            function r(e, t, n) {
                var r = new RegExp(t, "gi").exec(e);
                return r ? r[n] : null
            }
            function w(e) {
                var t = e.doctype,
                    n = "<!DOCTYPE html>";
                return t && (n = "<!DOCTYPE " + t.name + (t.publicId ? ' PUBLIC "' + t.publicId + '"' : "") + (!t.publicId && t.systemId ? " SYSTEM" : "") + (t.systemId ? ' "' + t.systemId + '"' : "") + ">"), n
            }
            function d(e) {
                var t = e.parentNode;
                if (t && (O.node.isBlock(t) || O.node.isElement(t)) && ["TD", "TH"].indexOf(t.tagName) < 0) {
                    for (var n = e.previousSibling, r = e.nextSibling; n && (n.nodeType == Node.TEXT_NODE && 0 === n.textContent.replace(/\n|\r/g, "").length || O.node.hasClass(n, "fr-tmp"));) n = n.previousSibling;
                    if (r) return !1;
                    n && t && "BR" != n.tagName && !O.node.isBlock(n) && !r && 0 < t.textContent.replace(/\u200B/g, "").length && 0 < n.textContent.length && !O.node.hasClass(n, "fr-marker") && (O.el == t && !r && O.opts.enter == M.FE.ENTER_BR && O.browser.msie || e.parentNode.removeChild(e))
                } else!t || O.node.isBlock(t) || O.node.isElement(t) || e.previousSibling || e.nextSibling || !O.node.isDeletable(e.parentNode) || d(e.parentNode)
            }
            function u() {
                O.opts.htmlUntouched || (e(), t(), n(), O.spaces.normalize(null, !0), O.html.fillEmptyBlocks(), O.clean.lists(), O.clean.tables(), O.clean.toHTML5(), O.html.cleanBRs()), O.selection.restore(), o(), O.placeholder.refresh()
            }
            function o() {
                O.node.isEmpty(O.el) && (null != c() ? O.el.querySelector(p()) || O.el.querySelector(O.opts.htmlDoNotWrapTags.join(":not(.fr-marker),") + ":not(.fr-marker)") || (O.core.hasFocus() ? (O.$el.html("<" + c() + ">" + M.FE.MARKERS + "<br/></" + c() + ">"), O.selection.restore()) : O.$el.html("<" + c() + "><br/></" + c() + ">")) : O.el.querySelector("*:not(.fr-marker):not(br)") || (O.core.hasFocus() ? (O.$el.html(M.FE.MARKERS + "<br/>"), O.selection.restore()) : O.$el.html("<br/>")))
            }
            function g(e, t) {
                return r(e, "<" + t + "[^>]*?>([\\w\\W]*)</" + t + ">", 1)
            }
            function h(e, t) {
                var n = M("<div " + (r(e, "<" + t + "([^>]*?)>", 1) || "") + ">");
                return O.node.rawAttributes(n.get(0))
            }
            function m(e) {
                return (r(e, "<!DOCTYPE([^>]*?)>", 0) || "<!DOCTYPE html>").replace(/\n/g, " ").replace(/ {2,}/g, " ")
            }
            function E(e, t) {
                O.opts.htmlExecuteScripts ? e.html(t) : e.get(0).innerHTML = t
            }
            function F(e) {
                var t;
                (t = /:not\(([^\)]*)\)/g).test(e) && (e = e.replace(t, "     $1 "));
                var n = 100 * (e.match(/(#[^\s\+>~\.\[:]+)/g) || []).length + 10 * (e.match(/(\[[^\]]+\])/g) || []).length + 10 * (e.match(/(\.[^\s\+>~\.\[:]+)/g) || []).length + 10 * (e.match(/(:[\w-]+\([^\)]*\))/gi) || []).length + 10 * (e.match(/(:[^\s\+>~\.\[:]+)/g) || []).length + (e.match(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi) || []).length;
                return n += ((e = (e = e.replace(/[\*\s\+>~]/g, " ")).replace(/[#\.]/g, " ")).match(/([^\s\+>~\.\[:]+)/g) || []).length
            }
            function k(e) {
                if (O.events.trigger("html.processGet", [e]), e && e.getAttribute && "" === e.getAttribute("class") && e.removeAttribute("class"), e && e.getAttribute && "" === e.getAttribute("style") && e.removeAttribute("style"), e && e.nodeType == Node.ELEMENT_NODE) {
                    var t, n = e.querySelectorAll('[class=""],[style=""]');
                    for (t = 0; t < n.length; t++) {
                        var r = n[t];
                        "" === r.getAttribute("class") && r.removeAttribute("class"), "" === r.getAttribute("style") && r.removeAttribute("style")
                    }
                    if ("BR" === e.tagName) d(e);
                    else {
                        var o = e.querySelectorAll("br");
                        for (t = 0; t < o.length; t++) d(o[t])
                    }
                }
            }
            function D(e, t) {
                return e[3] - t[3]
            }
            function f(e) {
                var t = O.doc.createElement("div");
                return t.innerHTML = e, null !== t.querySelector(p())
            }
            function v(e) {
                var t = null;
                if (void 0 === e && (t = O.selection.element()), O.opts.keepFormatOnDelete) return !1;
                var n, r, o = t ? (t.textContent.match(/\u200B/g) || []).length - t.querySelectorAll(".fr-marker").length : 0;
                if ((O.el.textContent.match(/\u200B/g) || []).length - O.el.querySelectorAll(".fr-marker").length == o) return !1;
                do {
                    r = !1, n = O.el.querySelectorAll("*:not(.fr-marker)");
                    for (var i = 0; i < n.length; i++) {
                        var a = n[i];
                        if (t != a) {
                            var s = a.textContent;
                            0 === a.children.length && 1 === s.length && 8203 == s.charCodeAt(0) && "TD" !== a.tagName && (M(a).remove(), r = !0)
                        }
                    }
                } while (r)
            }
            return {
                defaultTag: c,
                isPreformatted: s,
                emptyBlocks: i,
                emptyBlockTagsQuery: function() {
                    return M.FE.BLOCK_TAGS.join(":empty, ") + ":empty"
                },
                blockTagsQuery: p,
                fillEmptyBlocks: function(e) {
                    for (var t = i(e), n = 0; n < t.length; n++) {
                        var r = t[n];
                        "false" === r.getAttribute("contenteditable") || r.querySelector(O.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),") + ":not(.fr-marker)") || O.node.isVoid(r) || "TABLE" != r.tagName && "TBODY" != r.tagName && "TR" != r.tagName && "UL" != r.tagName && "OL" != r.tagName && r.appendChild(O.doc.createElement("br"))
                    }
                    if (O.browser.msie && O.opts.enter == M.FE.ENTER_BR) {
                        var o = O.node.contents(O.el);
                        o.length && o[o.length - 1].nodeType == Node.TEXT_NODE && O.$el.append("<br>")
                    }
                },
                cleanEmptyTags: e,
                cleanWhiteTags: v,
                cleanBlankSpaces: n,
                blocks: function() {
                    return O.$el.get(0).querySelectorAll(p())
                },
                getDoctype: w,
                set: function(e) {
                    var t, n, r, o = O.clean.html((e || "").trim(), [], [], O.opts.fullPage);
                    if (O.opts.fullPage) {
                        var i = g(o, "body") || (0 <= o.indexOf("<body") ? "" : o),
                            a = h(o, "body"),
                            s = g(o, "head") || "<title></title>",
                            l = h(o, "head"),
                            d = M("<div>").append(s).contents().each(function() {
                                (this.nodeType == Node.COMMENT_NODE || 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName)) && this.parentNode.removeChild(this)
                            }).end().html().trim();
                        s = M("<div>").append(s).contents().map(function() {
                            return this.nodeType == Node.COMMENT_NODE ? "\x3c!--" + this.nodeValue + "--\x3e" : 0 <= ["BASE", "LINK", "META", "NOSCRIPT", "SCRIPT", "STYLE", "TEMPLATE", "TITLE"].indexOf(this.tagName) ? this.outerHTML : ""
                        }).toArray().join("");
                        var c = m(o),
                            f = h(o, "html");
                        E(O.$el, d + "\n" + i), O.node.clearAttributes(O.el), O.$el.attr(a), O.$el.addClass("fr-view"), O.$el.attr("spellcheck", O.opts.spellcheck), O.$el.attr("dir", O.opts.direction), E(O.$head, s), O.node.clearAttributes(O.$head.get(0)), O.$head.attr(l), O.node.clearAttributes(O.$html.get(0)), O.$html.attr(f), O.iframe_document.doctype.parentNode.replaceChild((t = c, n = O.iframe_document, (r = t.match(/<!DOCTYPE ?([^ ]*) ?([^ ]*) ?"?([^"]*)"? ?"?([^"]*)"?>/i)) ? n.implementation.createDocumentType(r[1], r[3], r[4]) : n.implementation.createDocumentType("html")), O.iframe_document.doctype)
                    } else E(O.$el, o);
                    var p = O.edit.isDisabled();
                    O.edit.on(), O.core.injectStyle(O.opts.iframeDefaultStyle + O.opts.iframeStyle), u(), O.opts.useClasses || (O.$el.find("[fr-original-class]").each(function() {
                        this.setAttribute("class", this.getAttribute("fr-original-class")), this.removeAttribute("fr-original-class")
                    }), O.$el.find("[fr-original-style]").each(function() {
                        this.setAttribute("style", this.getAttribute("fr-original-style")), this.removeAttribute("fr-original-style")
                    })), p && O.edit.off(), O.events.trigger("html.set")
                },
                get: function(e, t) {
                    if (!O.$wp) return O.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;
                    var n = "";
                    O.events.trigger("html.beforeGet");
                    var r, o, i = [],
                        a = {},
                        s = [],
                        l = O.el.querySelectorAll("input, textarea");
                    for (r = 0; r < l.length; r++) l[r].setAttribute("value", l[r].value);
                    if (!O.opts.useClasses && !t) {
                        var d = new RegExp("^" + O.opts.htmlIgnoreCSSProperties.join("$|^") + "$", "gi");
                        for (r = 0; r < O.doc.styleSheets.length; r++) {
                            var c, f = 0;
                            try {
                                c = O.doc.styleSheets[r].cssRules, O.doc.styleSheets[r].ownerNode && "STYLE" == O.doc.styleSheets[r].ownerNode.nodeType && (f = 1)
                            } catch ($) {}
                            if (c) for (var p = 0, u = c.length; p < u; p++) if (c[p].selectorText && 0 < c[p].style.cssText.length) {
                                var g, h = c[p].selectorText.replace(/body |\.fr-view /g, "").replace(/::/g, ":");
                                try {
                                    g = O.el.querySelectorAll(h)
                                } catch ($) {
                                    g = []
                                }
                                for (o = 0; o < g.length; o++) {
                                    !g[o].getAttribute("fr-original-style") && g[o].getAttribute("style") ? (g[o].setAttribute("fr-original-style", g[o].getAttribute("style")), i.push(g[o])) : g[o].getAttribute("fr-original-style") || (g[o].setAttribute("fr-original-style", ""), i.push(g[o])), a[g[o]] || (a[g[o]] = {});
                                    for (var m = 1e3 * f + F(c[p].selectorText), E = c[p].style.cssText.split(";"), v = 0; v < E.length; v++) {
                                        var b = E[v].trim().split(":")[0];
                                        if (b && !b.match(d) && (a[g[o]][b] || (a[g[o]][b] = 0) <= (g[o].getAttribute("fr-original-style") || "").indexOf(b + ":") && (a[g[o]][b] = 1e4), m >= a[g[o]][b] && (a[g[o]][b] = m, E[v].trim().length))) {
                                            var S = E[v].trim().split(":");
                                            S.splice(0, 1), s.push([g[o], b.trim(), S.join(":").trim(), m])
                                        }
                                    }
                                }
                            }
                        }
                        for (s.sort(D), r = 0; r < s.length; r++) {
                            var T = s[r];
                            T[0].style[T[1]] = T[2]
                        }
                        for (r = 0; r < i.length; r++) if (i[r].getAttribute("class") && (i[r].setAttribute("fr-original-class", i[r].getAttribute("class")), i[r].removeAttribute("class")), 0 < (i[r].getAttribute("fr-original-style") || "").trim().length) {
                            var y = i[r].getAttribute("fr-original-style").split(";");
                            for (o = 0; o < y.length; o++) if (0 < y[o].indexOf(":")) {
                                var N = y[o].split(":"),
                                    C = N[0];
                                N.splice(0, 1), i[r].style[C.trim()] = N.join(":").trim()
                            }
                        }
                    }
                    if (O.node.isEmpty(O.el)) O.opts.fullPage && (n = w(O.iframe_document), n += "<html" + O.node.attributes(O.$html.get(0)) + ">" + O.$html.find("head").get(0).outerHTML + "<body></body></html>");
                    else if (void 0 === e && (e = !1), O.opts.fullPage) {
                        n = w(O.iframe_document), O.$el.removeClass("fr-view");
                        var A = O.opts.heightMin;
                        O.opts.heightMin = null, O.size.refresh(), n += "<html" + O.node.attributes(O.$html.get(0)) + ">" + O.$html.html() + "</html>", O.opts.heightMin = A, O.size.refresh(), O.$el.addClass("fr-view")
                    } else n = O.$el.html();
                    if (!O.opts.useClasses && !t) for (r = 0; r < i.length; r++) i[r].getAttribute("fr-original-class") && (i[r].setAttribute("class", i[r].getAttribute("fr-original-class")), i[r].removeAttribute("fr-original-class")), null != i[r].getAttribute("fr-original-style") && void 0 !== i[r].getAttribute("fr-original-style") ? (0 !== i[r].getAttribute("fr-original-style").length ? i[r].setAttribute("style", i[r].getAttribute("fr-original-style")) : i[r].removeAttribute("style"), i[r].removeAttribute("fr-original-style")) : i[r].removeAttribute("style");
                    O.opts.fullPage && (n = (n = (n = (n = (n = (n = (n = (n = n.replace(/<style data-fr-style="true">(?:[\w\W]*?)<\/style>/g, "")).replace(/<link([^>]*)data-fr-style="true"([^>]*)>/g, "")).replace(/<style(?:[\w\W]*?)class="firebugResetStyles"(?:[\w\W]*?)>(?:[\w\W]*?)<\/style>/g, "")).replace(/<body((?:[\w\W]*?)) spellcheck="true"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$2>$3</body>")).replace(/<body((?:[\w\W]*?)) contenteditable="(true|false)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?)) dir="([\w]*)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?))class="([\w\W]*?)(fr-rtl|fr-ltr)([\w\W]*?)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, '<body$1class="$2$4"$5>$6</body>')).replace(/<body((?:[\w\W]*?)) class=""((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g, "<body$1$2>$3</body>")), O.opts.htmlSimpleAmpersand && (n = n.replace(/\&amp;/gi, "&")), O.events.trigger("html.afterGet"), e || (n = n.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi, "")), n = O.clean.invisibleSpaces(n), n = O.clean.exec(n, k);
                    var x = O.events.chainTrigger("html.get", n);
                    return "string" == typeof x && (n = x), n = n.replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g, function(e) {
                        return e.replace(/<br>/g, "\n")
                    })
                },
                getSelected: function() {
                    var e, t, n = function(e, t) {
                            for (; t && (t.nodeType == Node.TEXT_NODE || !O.node.isBlock(t)) && !O.node.isElement(t) && !O.node.hasClass(t, "fr-inner");) t && t.nodeType != Node.TEXT_NODE && M(e).wrapInner(O.node.openTagString(t) + O.node.closeTagString(t)), t = t.parentNode;
                            t && e.innerHTML == t.innerHTML && (e.innerHTML = t.outerHTML)
                        },
                        r = "";
                    if ("undefined" != typeof O.win.getSelection) {
                        O.browser.mozilla && (O.selection.save(), 1 < O.$el.find('.fr-marker[data-type="false"]').length && (O.$el.find('.fr-marker[data-type="false"][data-id="0"]').remove(), O.$el.find('.fr-marker[data-type="false"]:last').attr("data-id", "0"), O.$el.find(".fr-marker").not('[data-id="0"]').remove()), O.selection.restore());
                        for (var o = O.selection.ranges(), i = 0; i < o.length; i++) {
                            var a = document.createElement("div");
                            a.appendChild(o[i].cloneContents()), n(a, (t = e = void 0, t = null, O.win.getSelection ? (e = O.win.getSelection()) && e.rangeCount && (t = e.getRangeAt(0).commonAncestorContainer).nodeType != Node.ELEMENT_NODE && (t = t.parentNode) : (e = O.doc.selection) && "Control" != e.type && (t = e.createRange().parentElement()), null != t && (0 <= M.inArray(O.el, M(t).parents()) || t == O.el) ? t : null)), 0 < M(a).find(".fr-element").length && (a = O.el), r += a.innerHTML
                        }
                    } else "undefined" != typeof O.doc.selection && "Text" == O.doc.selection.type && (r = O.doc.selection.createRange().htmlText);
                    return r
                },
                insert: function(e, t, n) {
                    var r, o, i;
                    if (O.selection.isCollapsed() || O.selection.remove(), r = t ? e : O.clean.html(e), e.indexOf('class="fr-marker"') < 0 && (o = r, (i = O.doc.createElement("div")).innerHTML = o, O.selection.setAtEnd(i), r = i.innerHTML), O.node.isEmpty(O.el) && !O.opts.keepFormatOnDelete && f(r)) O.el.innerHTML = r;
                    else {
                        var a = O.markers.insert();
                        if (a) {
                            O.node.isLastSibling(a) && M(a).parent().hasClass("fr-deletable") && M(a).insertAfter(M(a).parent());
                            var s = O.node.blockParent(a);
                            if ((f(r) || n) && (O.node.deepestParent(a) || s && "LI" == s.tagName)) {
                                if (s && "LI" == s.tagName && (r = function(e) {
                                        if (!O.html.defaultTag()) return e;
                                        var t = O.doc.createElement("div");
                                        t.innerHTML = e;
                                        for (var n = t.querySelectorAll(":scope > " + O.html.defaultTag()), r = n.length - 1; 0 <= r; r--) {
                                            var o = n[r];
                                            O.node.isBlock(o.previousSibling) || (o.previousSibling && !O.node.isEmpty(o) && M("<br>").insertAfter(o.previousSibling), o.outerHTML = o.innerHTML)
                                        }
                                        return t.innerHTML
                                    }(r)), !(a = O.markers.split())) return !1;
                                a.outerHTML = r
                            } else a.outerHTML = r
                        } else O.el.innerHTML = O.el.innerHTML + r
                    }
                    u(), O.keys.positionCaret(), O.events.trigger("html.inserted")
                },
                wrap: t,
                unwrap: function() {
                    O.$el.find("div.fr-temp-div").each(function() {
                        this.previousSibling && this.previousSibling.nodeType === Node.TEXT_NODE && M(this).before("<br>"), M(this).attr("data-empty") || !this.nextSibling || O.node.isBlock(this.nextSibling) && !M(this.nextSibling).hasClass("fr-temp-div") ? M(this).replaceWith(M(this).html()) : M(this).replaceWith(M(this).html() + "<br>")
                    }), O.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter(function() {
                        return "" === M(this).attr("class")
                    }).removeAttr("class")
                },
                escapeEntities: function(e) {
                    return e.replace(/</gi, "&lt;").replace(/>/gi, "&gt;").replace(/"/gi, "&quot;").replace(/'/gi, "&#39;")
                },
                checkIfEmpty: o,
                extractNode: g,
                extractNodeAttrs: h,
                extractDoctype: m,
                cleanBRs: function() {
                    for (var e = O.el.getElementsByTagName("br"), t = 0; t < e.length; t++) d(e[t])
                },
                _init: function() {
                    if (O.$wp) {
                        var e = function() {
                            v(), O.placeholder && setTimeout(O.placeholder.refresh, 0)
                        };
                        O.events.on("mouseup", e), O.events.on("keydown", e), O.events.on("contentChanged", o)
                    }
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            height: null,
            heightMax: null,
            heightMin: null,
            width: null
        }), M.FE.MODULES.size = function(e) {
            function t() {
                n(), e.opts.height && e.$el.css("minHeight", e.opts.height - e.helpers.getPX(e.$el.css("padding-top")) - e.helpers.getPX(e.$el.css("padding-bottom"))), e.$iframe.height(e.$el.outerHeight(!0))
            }
            function n() {
                e.opts.heightMin ? e.$el.css("minHeight", e.opts.heightMin) : e.$el.css("minHeight", ""), e.opts.heightMax ? (e.$wp.css("maxHeight", e.opts.heightMax), e.$wp.css("overflow", "auto")) : (e.$wp.css("maxHeight", ""), e.$wp.css("overflow", "")), e.opts.height ? (e.$wp.height(e.opts.height), e.$wp.css("overflow", "auto"), e.$el.css("minHeight", e.opts.height - e.helpers.getPX(e.$el.css("padding-top")) - e.helpers.getPX(e.$el.css("padding-bottom")))) : (e.$wp.css("height", ""), e.opts.heightMin || e.$el.css("minHeight", ""), e.opts.heightMax || e.$wp.css("overflow", "")), e.opts.width && e.$box.width(e.opts.width)
            }
            return {
                _init: function() {
                    if (!e.$wp) return !1;
                    n(), e.$iframe && (e.events.on("keyup keydown", function() {
                        setTimeout(t, 0)
                    }, !0), e.events.on("commands.after html.set init initialized paste.after", t))
                },
                syncIframe: t,
                refresh: n
            }
        }, M.extend(M.FE.DEFAULTS, {
            language: null
        }), M.FE.LANGUAGE = {}, M.FE.MODULES.language = function(e) {
            var t;
            return {
                _init: function() {
                    M.FE.LANGUAGE && (t = M.FE.LANGUAGE[e.opts.language]), t && t.direction && (e.opts.direction = t.direction)
                },
                translate: function(e) {
                    return t && t.translation[e] && t.translation[e].length ? t.translation[e] : e
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            placeholderText: "Type something"
        }), M.FE.MODULES.placeholder = function(c) {
            function e() {
                c.$placeholder || (c.$placeholder = M('<span class="fr-placeholder"></span>'), c.$wp.append(c.$placeholder));
                var e = c.opts.iframe ? c.$iframe.prev().outerHeight(!0) : c.$el.prev().outerHeight(!0),
                    t = 0,
                    n = 0,
                    r = 0,
                    o = 0,
                    i = 0,
                    a = 0,
                    s = c.node.contents(c.el),
                    l = M(c.selection.element()).css("text-align");
                if (s.length && s[0].nodeType == Node.ELEMENT_NODE) {
                    var d = M(s[0]);
                    (!c.opts.toolbarInline || 0 < c.$el.prev().length) && c.ready && (t = c.helpers.getPX(d.css("margin-top")), o = c.helpers.getPX(d.css("padding-top")), n = c.helpers.getPX(d.css("margin-left")), r = c.helpers.getPX(d.css("margin-right")), i = c.helpers.getPX(d.css("padding-left")), a = c.helpers.getPX(d.css("padding-right"))), c.$placeholder.css("font-size", d.css("font-size")), c.$placeholder.css("line-height", d.css("line-height"))
                } else c.$placeholder.css("font-size", c.$el.css("font-size")), c.$placeholder.css("line-height", c.$el.css("line-height"));
                c.$wp.addClass("show-placeholder"), c.$placeholder.css({
                    marginTop: Math.max(c.helpers.getPX(c.$el.css("margin-top")), t) + (e || 0),
                    paddingTop: Math.max(c.helpers.getPX(c.$el.css("padding-top")), o),
                    paddingLeft: Math.max(c.helpers.getPX(c.$el.css("padding-left")), i),
                    marginLeft: Math.max(c.helpers.getPX(c.$el.css("margin-left")), n),
                    paddingRight: Math.max(c.helpers.getPX(c.$el.css("padding-right")), a),
                    marginRight: Math.max(c.helpers.getPX(c.$el.css("margin-right")), r),
                    textAlign: l
                }).text(c.language.translate(c.opts.placeholderText || c.$oel.attr("placeholder") || "")), c.$placeholder.html(c.$placeholder.text().replace(/\n/g, "<br>"))
            }
            function t() {
                c.$wp.removeClass("show-placeholder")
            }
            function n() {
                if (!c.$wp) return !1;
                c.core.isEmpty() ? e() : t()
            }
            return {
                _init: function() {
                    if (!c.$wp) return !1;
                    c.events.on("init input keydown keyup contentChanged initialized", n)
                },
                show: e,
                hide: t,
                refresh: n,
                isVisible: function() {
                    return !c.$wp || c.node.hasClass(c.$wp.get(0), "show-placeholder")
                }
            }
        }, M.FE.MODULES.edit = function(t) {
            function e() {
                if (t.browser.mozilla) try {
                    t.doc.execCommand("enableObjectResizing", !1, "false"), t.doc.execCommand("enableInlineTableEditing", !1, "false")
                } catch (e) {}
                if (t.browser.msie) try {
                    t.doc.body.addEventListener("mscontrolselect", function(e) {
                        return e.preventDefault(), !1
                    })
                } catch (e) {}
            }
            var n = !1;

            function r() {
                return n
            }
            return {
                _init: function() {
                    t.events.on("focus", function() {
                        r() ? t.edit.off() : t.edit.on()
                    })
                },
                on: function() {
                    t.$wp ? (t.$el.attr("contenteditable", !0), t.$el.removeClass("fr-disabled").attr("aria-disabled", !1), t.$tb && t.$tb.removeClass("fr-disabled").removeAttr("aria-disabled"), e()) : t.$el.is("a") && t.$el.attr("contenteditable", !0), n = !1
                },
                off: function() {
                    t.events.disableBlur(), t.$wp ? (t.$el.attr("contenteditable", !1), t.$el.addClass("fr-disabled").attr("aria-disabled", !0), t.$tb && t.$tb.addClass("fr-disabled").attr("aria-disabled", !0)) : t.$el.is("a") && t.$el.attr("contenteditable", !1), t.events.enableBlur(), n = !0
                },
                disableDesign: e,
                isDisabled: r
            }
        }, M.extend(M.FE.DEFAULTS, {
            editorClass: null,
            typingTimer: 500,
            iframe: !1,
            requestWithCORS: !0,
            requestWithCredentials: !1,
            requestHeaders: {},
            useClasses: !0,
            spellcheck: !0,
            iframeDefaultStyle: 'html{margin:0px;height:auto;}body{height:auto;padding:10px;background:transparent;color:#000000;position:relative;z-index: 2;-webkit-user-select:auto;margin:0px;overflow:hidden;min-height:20px;}body:after{content:"";display:block;clear:both;}body::-moz-selection{background:#b5d6fd;color:#000;}body::selection{background:#b5d6fd;color:#000;}',
            iframeStyle: "",
            iframeStyleFiles: [],
            direction: "auto",
            zIndex: 1,
            tabIndex: null,
            disableRightClick: !1,
            scrollableContainer: "body",
            keepFormatOnDelete: !1,
            theme: null
        }), M.FE.MODULES.core = function(i) {
            function t() {
                if (i.$box.addClass("fr-box" + (i.opts.editorClass ? " " + i.opts.editorClass : "")), i.$box.attr("role", "application"), i.$wp.addClass("fr-wrapper"), i.opts.iframe || i.$el.addClass("fr-element fr-view"), i.opts.iframe) {
                    i.$iframe.addClass("fr-iframe"), i.$el.addClass("fr-view");
                    for (var e = 0; e < i.o_doc.styleSheets.length; e++) {
                        var t;
                        try {
                            t = i.o_doc.styleSheets[e].cssRules
                        } catch (o) {}
                        if (t) for (var n = 0, r = t.length; n < r; n++)!t[n].selectorText || 0 !== t[n].selectorText.indexOf(".fr-view") && 0 !== t[n].selectorText.indexOf(".fr-element") || 0 < t[n].style.cssText.length && (0 === t[n].selectorText.indexOf(".fr-view") ? i.opts.iframeStyle += t[n].selectorText.replace(/\.fr-view/g, "body") + "{" + t[n].style.cssText + "}" : i.opts.iframeStyle += t[n].selectorText.replace(/\.fr-element/g, "body") + "{" + t[n].style.cssText + "}")
                    }
                }
                "auto" != i.opts.direction && i.$box.removeClass("fr-ltr fr-rtl").addClass("fr-" + i.opts.direction), i.$el.attr("dir", i.opts.direction), i.$wp.attr("dir", i.opts.direction), 1 < i.opts.zIndex && i.$box.css("z-index", i.opts.zIndex), i.opts.theme && i.$box.addClass(i.opts.theme + "-theme"), i.opts.tabIndex = i.opts.tabIndex || i.$oel.attr("tabIndex"), i.opts.tabIndex && i.$el.attr("tabIndex", i.opts.tabIndex)
            }
            return {
                _init: function() {
                    if (M.FE.INSTANCES.push(i), i.drag_support = {
                            filereader: "undefined" != typeof FileReader,
                            formdata: !! i.win.FormData,
                            progress: "upload" in new XMLHttpRequest
                        }, i.$wp) {
                        t(), i.html.set(i._original_html), i.$el.attr("spellcheck", i.opts.spellcheck), i.helpers.isMobile() && (i.$el.attr("autocomplete", i.opts.spellcheck ? "on" : "off"), i.$el.attr("autocorrect", i.opts.spellcheck ? "on" : "off"), i.$el.attr("autocapitalize", i.opts.spellcheck ? "on" : "off")), i.opts.disableRightClick && i.events.$on(i.$el, "contextmenu", function(e) {
                            if (2 == e.button) return !1
                        });
                        try {
                            i.doc.execCommand("styleWithCSS", !1, !1)
                        } catch (e) {}
                    }
                    "TEXTAREA" == i.$oel.get(0).tagName && (i.events.on("contentChanged", function() {
                        i.$oel.val(i.html.get())
                    }), i.events.on("form.submit", function() {
                        i.$oel.val(i.html.get())
                    }), i.events.on("form.reset", function() {
                        i.html.set(i._original_html)
                    }), i.$oel.val(i.html.get())), i.helpers.isIOS() && i.events.$on(i.$doc, "selectionchange", function() {
                        i.$doc.get(0).hasFocus() || i.$win.get(0).focus()
                    }), i.events.trigger("init"), i.opts.autofocus && !i.opts.initOnClick && i.$wp && i.events.on("initialized", function() {
                        i.events.focus(!0)
                    })
                },
                destroy: function(e) {
                    "TEXTAREA" == i.$oel.get(0).tagName && i.$oel.val(e), i.$box && i.$box.removeAttr("role"), i.$wp && ("TEXTAREA" == i.$oel.get(0).tagName ? (i.$el.html(""), i.$wp.html(""), i.$box.replaceWith(i.$oel), i.$oel.show()) : (i.$wp.replaceWith(e), i.$el.html(""), i.$box.removeClass("fr-view fr-ltr fr-box " + (i.opts.editorClass || "")), i.opts.theme && i.$box.addClass(i.opts.theme + "-theme"))), this.$wp = null, this.$el = null, this.el = null, this.$box = null
                },
                isEmpty: function() {
                    return i.node.isEmpty(i.el)
                },
                getXHR: function(e, t) {
                    var n = new XMLHttpRequest;
                    for (var r in n.open(t, e, !0), i.opts.requestWithCredentials && (n.withCredentials = !0), i.opts.requestHeaders) i.opts.requestHeaders.hasOwnProperty(r) && n.setRequestHeader(r, i.opts.requestHeaders[r]);
                    return n
                },
                injectStyle: function(e) {
                    if (i.opts.iframe) {
                        i.$head.find("style[data-fr-style], link[data-fr-style]").remove(), i.$head.append('<style data-fr-style="true">' + e + "</style>");
                        for (var t = 0; t < i.opts.iframeStyleFiles.length; t++) {
                            var n = M('<link data-fr-style="true" rel="stylesheet" href="' + i.opts.iframeStyleFiles[t] + '">');
                            n.get(0).addEventListener("load", i.size.syncIframe), i.$head.append(n)
                        }
                    }
                },
                hasFocus: function() {
                    return i.browser.mozilla && i.helpers.isMobile() ? i.selection.inEditor() : i.node.hasFocus(i.el) || 0 < i.$el.find("*:focus").length
                },
                sameInstance: function(e) {
                    if (!e) return !1;
                    var t = e.data("instance");
                    return !!t && t.id == i.id
                }
            }
        }, M.FE.MODULES.cursorLists = function(h) {
            function m(e) {
                for (var t = e;
                     "LI" != t.tagName;) t = t.parentNode;
                return t
            }
            function E(e) {
                for (var t = e; !h.node.isList(t);) t = t.parentNode;
                return t
            }
            return {
                _startEnter: function(e) {
                    var t, n = m(e),
                        r = n.nextSibling,
                        o = n.previousSibling,
                        i = h.html.defaultTag();
                    if (h.node.isEmpty(n, !0) && r) {
                        for (var a = "", s = "", l = e.parentNode; !h.node.isList(l) && l.parentNode && "LI" !== l.parentNode.tagName;) a = h.node.openTagString(l) + a, s += h.node.closeTagString(l), l = l.parentNode;
                        a = h.node.openTagString(l) + a, s += h.node.closeTagString(l);
                        var d = "";
                        for (d = l.parentNode && "LI" == l.parentNode.tagName ? s + "<li>" + M.FE.MARKERS + "<br>" + a : i ? s + "<" + i + ">" + M.FE.MARKERS + "<br></" + i + ">" + a : s + M.FE.MARKERS + "<br>" + a, M(n).html('<span id="fr-break"></span>');
                             ["UL", "OL"].indexOf(l.tagName) < 0 || l.parentNode && "LI" === l.parentNode.tagName;) l = l.parentNode;
                        var c = h.node.openTagString(l) + M(l).html() + h.node.closeTagString(l);
                        c = c.replace(/<span id="fr-break"><\/span>/g, d), M(l).replaceWith(c), h.$el.find("li:empty").remove()
                    } else if (o && r || !h.node.isEmpty(n, !0)) {
                        for (var f = "<br>", p = e.parentNode; p && "LI" != p.tagName;) f = h.node.openTagString(p) + f + h.node.closeTagString(p), p = p.parentNode;
                        M(n).before("<li>" + f + "</li>"), M(e).remove()
                    } else if (o) {
                        t = E(n);
                        for (var u = M.FE.MARKERS + "<br>", g = e.parentNode; g && "LI" != g.tagName;) u = h.node.openTagString(g) + u + h.node.closeTagString(g), g = g.parentNode;
                        t.parentNode && "LI" == t.parentNode.tagName ? M(t.parentNode).after("<li>" + u + "</li>") : i ? M(t).after("<" + i + ">" + u + "</" + i + ">") : M(t).after(u), M(n).remove()
                    } else(t = E(n)).parentNode && "LI" == t.parentNode.tagName ? r ? M(t.parentNode).before(h.node.openTagString(n) + M.FE.MARKERS + "<br></li>") : M(t.parentNode).after(h.node.openTagString(n) + M.FE.MARKERS + "<br></li>") : i ? M(t).before("<" + i + ">" + M.FE.MARKERS + "<br></" + i + ">") : M(t).before(M.FE.MARKERS + "<br>"), M(n).remove()
                },
                _middleEnter: function(e) {
                    for (var t = m(e), n = "", r = e, o = "", i = ""; r != t;) {
                        var a = "A" == (r = r.parentNode).tagName && h.cursor.isAtEnd(e, r) ? "fr-to-remove" : "";
                        o = h.node.openTagString(M(r).clone().addClass(a).get(0)) + o, i = h.node.closeTagString(r) + i
                    }
                    n = i + n + o + M.FE.MARKERS + M.FE.INVISIBLE_SPACE, M(e).replaceWith('<span id="fr-break"></span>');
                    var s = h.node.openTagString(t) + M(t).html() + h.node.closeTagString(t);
                    s = s.replace(/<span id="fr-break"><\/span>/g, n), M(t).replaceWith(s)
                },
                _endEnter: function(e) {
                    for (var t = m(e), n = M.FE.MARKERS, r = "", o = e, i = !1; o != t;) {
                        var a = "A" == (o = o.parentNode).tagName && h.cursor.isAtEnd(e, o) ? "fr-to-remove" : "";
                        i || o == t || h.node.isBlock(o) || (i = !0, r += M.FE.INVISIBLE_SPACE), r = h.node.openTagString(M(o).clone().addClass(a).get(0)) + r, n += h.node.closeTagString(o)
                    }
                    var s = r + n;
                    M(e).remove(), M(t).after(s)
                },
                _backspace: function(e) {
                    var t = m(e),
                        n = t.previousSibling;
                    if (n) {
                        n = M(n).find(h.html.blockTagsQuery()).get(-1) || n, M(e).replaceWith(M.FE.MARKERS);
                        var r = h.node.contents(n);
                        r.length && "BR" == r[r.length - 1].tagName && M(r[r.length - 1]).remove(), M(t).find(h.html.blockTagsQuery()).not("ol, ul, table").each(function() {
                            this.parentNode == t && M(this).replaceWith(M(this).html() + (h.node.isEmpty(this) ? "" : "<br>"))
                        });
                        for (var o, i = h.node.contents(t)[0]; i && !h.node.isList(i);) o = i.nextSibling, M(n).append(i), i = o;
                        for (n = t.previousSibling; i;) o = i.nextSibling, M(n).append(i), i = o;
                        M(t).remove()
                    } else {
                        var a = E(t);
                        if (M(e).replaceWith(M.FE.MARKERS), a.parentNode && "LI" == a.parentNode.tagName) {
                            var s = a.previousSibling;
                            h.node.isBlock(s) ? (M(t).find(h.html.blockTagsQuery()).not("ol, ul, table").each(function() {
                                this.parentNode == t && M(this).replaceWith(M(this).html() + (h.node.isEmpty(this) ? "" : "<br>"))
                            }), M(s).append(M(t).html())) : M(a).before(M(t).html())
                        } else {
                            var l = h.html.defaultTag();
                            l && 0 === M(t).find(h.html.blockTagsQuery()).length ? M(a).before("<" + l + ">" + M(t).html() + "</" + l + ">") : M(a).before(M(t).html())
                        }
                        M(t).remove(), h.html.wrap(), 0 === M(a).find("li").length && M(a).remove()
                    }
                },
                _del: function(e) {
                    var t, n = m(e),
                        r = n.nextSibling;
                    if (r) {
                        (t = h.node.contents(r)).length && "BR" == t[0].tagName && M(t[0]).remove(), M(r).find(h.html.blockTagsQuery()).not("ol, ul, table").each(function() {
                            this.parentNode == r && M(this).replaceWith(M(this).html() + (h.node.isEmpty(this) ? "" : "<br>"))
                        });
                        for (var o, i = e, a = h.node.contents(r)[0]; a && !h.node.isList(a);) o = a.nextSibling, M(i).after(a), i = a, a = o;
                        for (; a;) o = a.nextSibling, M(n).append(a), a = o;
                        M(e).replaceWith(M.FE.MARKERS), M(r).remove()
                    } else {
                        for (var s = n; !s.nextSibling && s != h.el;) s = s.parentNode;
                        if (s == h.el) return !1;
                        if (s = s.nextSibling, h.node.isBlock(s)) M.FE.NO_DELETE_TAGS.indexOf(s.tagName) < 0 && (M(e).replaceWith(M.FE.MARKERS), (t = h.node.contents(n)).length && "BR" == t[t.length - 1].tagName && M(t[t.length - 1]).remove(), M(n).append(M(s).html()), M(s).remove());
                        else for ((t = h.node.contents(n)).length && "BR" == t[t.length - 1].tagName && M(t[t.length - 1]).remove(), M(e).replaceWith(M.FE.MARKERS); s && !h.node.isBlock(s) && "BR" != s.tagName;) M(n).append(M(s)), s = s.nextSibling
                    }
                }
            }
        }, M.FE.NO_DELETE_TAGS = ["TH", "TD", "TR", "TABLE", "FORM"], M.FE.SIMPLE_ENTER_TAGS = ["TH", "TD", "LI", "DL", "DT", "FORM"], M.FE.MODULES.cursor = function(u) {
            function i(e) {
                return !!e && ( !! u.node.isBlock(e) || (e.nextSibling && e.nextSibling.nodeType == Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? i(e.nextSibling) : !(e.nextSibling && (!e.previousSibling || "BR" != e.nextSibling.tagName || e.nextSibling.nextSibling)) && i(e.parentNode)))
            }
            function a(e) {
                return !!e && ( !! u.node.isBlock(e) || (e.previousSibling && e.previousSibling.nodeType == Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? a(e.previousSibling) : !e.previousSibling && (!(e.previousSibling || !u.node.hasClass(e.parentNode, "fr-inner")) || a(e.parentNode))))
            }
            function g(e, t) {
                return !!e && (e != u.$wp.get(0) && (e.previousSibling && e.previousSibling.nodeType == Node.TEXT_NODE && 0 === e.previousSibling.textContent.replace(/\u200b/g, "").length ? g(e.previousSibling, t) : !e.previousSibling && (e.parentNode == t || g(e.parentNode, t))))
            }
            function h(e, t) {
                return !!e && (e != u.$wp.get(0) && (e.nextSibling && e.nextSibling.nodeType == Node.TEXT_NODE && 0 === e.nextSibling.textContent.replace(/\u200b/g, "").length ? h(e.nextSibling, t) : !(e.nextSibling && (!e.previousSibling || "BR" != e.nextSibling.tagName || e.nextSibling.nextSibling)) && (e.parentNode == t || h(e.parentNode, t))))
            }
            function s(e) {
                return 0 < M(e).parentsUntil(u.$el, "LI").length && 0 === M(e).parentsUntil("LI", "TABLE").length
            }
            function d(e, t) {
                var n = new RegExp((t ? "^" : "") + "(([\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+\\u200D)*[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]{2})" + (t ? "" : "$"), "i"),
                    r = e.match(n);
                return r ? r[0].length : 1
            }
            function c(e) {
                for (var t, n = e; !n.previousSibling;) if (n = n.parentNode, u.node.isElement(n)) return !1;
                if (n = n.previousSibling, !u.node.isBlock(n) && u.node.isEditable(n)) {
                    for (t = u.node.contents(n); n.nodeType != Node.TEXT_NODE && !u.node.isDeletable(n) && t.length && u.node.isEditable(n);) n = t[t.length - 1], t = u.node.contents(n);
                    if (n.nodeType == Node.TEXT_NODE) {
                        var r = n.textContent,
                            o = r.length;
                        if (r.length && "\n" === r[r.length - 1]) return n.textContent = r.substring(0, o - 2), 0 === n.textContent.length && n.parentNode.removeChild(n), c(e);
                        if (u.opts.tabSpaces && r.length >= u.opts.tabSpaces) 0 === r.substr(r.length - u.opts.tabSpaces, r.length - 1).replace(/ /g, "").replace(new RegExp(M.FE.UNICODE_NBSP, "g"), "").length && (o = r.length - u.opts.tabSpaces + 1);
                        n.textContent = r.substring(0, o - d(r));
                        var i = r.length != n.textContent.length;
                        if (0 === n.textContent.length) if (i && u.opts.keepFormatOnDelete) M(n).after(M.FE.INVISIBLE_SPACE + M.FE.MARKERS);
                        else if ((2 != n.parentNode.childNodes.length || n.parentNode != e.parentNode) && 1 != n.parentNode.childNodes.length || u.node.isBlock(n.parentNode) || u.node.isElement(n.parentNode) || !u.node.isDeletable(n.parentNode)) {
                            for (; !u.node.isElement(n.parentNode) && u.node.isEmpty(n.parentNode);) {
                                var a = n;
                                n = n.parentNode, a.parentNode.removeChild(a)
                            }
                            M(n).after(M.FE.MARKERS), u.node.isElement(n.parentNode) && !e.nextSibling && n.previousSibling && "BR" == n.previousSibling.tagName && M(e).after("<br>"), n.parentNode.removeChild(n)
                        } else M(n.parentNode).after(M.FE.MARKERS), M(n.parentNode).remove();
                        else M(n).after(M.FE.MARKERS)
                    } else u.node.isDeletable(n) ? (M(n).after(M.FE.MARKERS), M(n).remove()) : e.nextSibling && "BR" == e.nextSibling.tagName && u.node.isVoid(n) && "BR" != n.tagName ? (M(e.nextSibling).remove(), M(e).replaceWith(M.FE.MARKERS)) : !1 !== u.events.trigger("node.remove", [M(n)]) && (M(n).after(M.FE.MARKERS), M(n).remove())
                } else if (M.FE.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n))) if (u.node.isDeletable(n)) M(e).replaceWith(M.FE.MARKERS), M(n).remove();
                else if (u.node.isEmpty(n) && !u.node.isList(n)) M(n).remove(), M(e).replaceWith(M.FE.MARKERS);
                else {
                    for (u.node.isList(n) && (n = M(n).find("li:last").get(0)), (t = u.node.contents(n)) && "BR" == t[t.length - 1].tagName && M(t[t.length - 1]).remove(), t = u.node.contents(n); t && u.node.isBlock(t[t.length - 1]);) n = t[t.length - 1], t = u.node.contents(n);
                    M(n).append(M.FE.MARKERS);
                    for (var s = e; !s.previousSibling;) s = s.parentNode;
                    for (; s && "BR" !== s.tagName && !u.node.isBlock(s);) {
                        var l = s;
                        s = s.nextSibling, M(n).append(l)
                    }
                    s && "BR" == s.tagName && M(s).remove(), M(e).remove()
                } else e.nextSibling && "BR" == e.nextSibling.tagName && M(e.nextSibling).remove()
            }
            function l(e) {
                var t = 0 < M(e).parentsUntil(u.$el, "BLOCKQUOTE").length,
                    n = u.node.deepestParent(e, [], !t);
                if (n && "BLOCKQUOTE" == n.tagName) {
                    var r = u.node.deepestParent(e, [M(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]);
                    r && r.nextSibling && (n = r)
                }
                if (null !== n) {
                    var o, i = n.nextSibling;
                    if (u.node.isBlock(n) && (u.node.isEditable(n) || u.node.isDeletable(n)) && i && M.FE.NO_DELETE_TAGS.indexOf(i.tagName) < 0) if (u.node.isDeletable(i)) M(i).remove(), M(e).replaceWith(M.FE.MARKERS);
                    else if (u.node.isBlock(i) && u.node.isEditable(i)) if (u.node.isList(i)) if (u.node.isEmpty(n, !0)) M(n).remove(), M(i).find("li:first").prepend(M.FE.MARKERS);
                    else {
                        var a = M(i).find("li:first");
                        "BLOCKQUOTE" == n.tagName && (o = u.node.contents(n)).length && u.node.isBlock(o[o.length - 1]) && (n = o[o.length - 1]), 0 === a.find("ul, ol").length && (M(e).replaceWith(M.FE.MARKERS), a.find(u.html.blockTagsQuery()).not("ol, ul, table").each(function() {
                            this.parentNode == a.get(0) && M(this).replaceWith(M(this).html() + (u.node.isEmpty(this) ? "" : "<br>"))
                        }), M(n).append(u.node.contents(a.get(0))), a.remove(), 0 === M(i).find("li").length && M(i).remove())
                    } else {
                        if ((o = u.node.contents(i)).length && "BR" == o[0].tagName && M(o[0]).remove(), "BLOCKQUOTE" != i.tagName && "BLOCKQUOTE" == n.tagName) for (o = u.node.contents(n); o.length && u.node.isBlock(o[o.length - 1]);) n = o[o.length - 1], o = u.node.contents(n);
                        else if ("BLOCKQUOTE" == i.tagName && "BLOCKQUOTE" != n.tagName) for (o = u.node.contents(i); o.length && u.node.isBlock(o[0]);) i = o[0], o = u.node.contents(i);
                        M(e).replaceWith(M.FE.MARKERS), M(n).append(i.innerHTML), M(i).remove()
                    } else {
                        for (M(e).replaceWith(M.FE.MARKERS); i && "BR" !== i.tagName && !u.node.isBlock(i) && u.node.isEditable(i);) {
                            var s = i;
                            i = i.nextSibling, M(n).append(s)
                        }
                        i && "BR" == i.tagName && u.node.isEditable(i) && M(i).remove()
                    }
                }
            }
            function n(e) {
                for (var t, n = e; !n.nextSibling;) if (n = n.parentNode, u.node.isElement(n)) return !1;
                if ("BR" == (n = n.nextSibling).tagName && u.node.isEditable(n)) if (n.nextSibling) {
                    if (u.node.isBlock(n.nextSibling) && u.node.isEditable(n.nextSibling)) {
                        if (!(M.FE.NO_DELETE_TAGS.indexOf(n.nextSibling.tagName) < 0)) return void M(n).remove();
                        n = n.nextSibling, M(n.previousSibling).remove()
                    }
                } else if (i(n)) {
                    if (s(e)) u.cursorLists._del(e);
                    else u.node.deepestParent(n) && ((!u.node.isEmpty(u.node.blockParent(n)) || (u.node.blockParent(n).nextSibling && M.FE.NO_DELETE_TAGS.indexOf(u.node.blockParent(n).nextSibling.tagName)) < 0) && M(n).remove(), l(e));
                    return
                }
                if (!u.node.isBlock(n) && u.node.isEditable(n)) {
                    for (t = u.node.contents(n); n.nodeType != Node.TEXT_NODE && t.length && !u.node.isDeletable(n) && u.node.isEditable(n);) n = t[0], t = u.node.contents(n);
                    n.nodeType == Node.TEXT_NODE ? (M(n).before(M.FE.MARKERS), n.textContent.length && (n.textContent = n.textContent.substring(d(n.textContent, !0), n.textContent.length))) : u.node.isDeletable(n) ? (M(n).before(M.FE.MARKERS), M(n).remove()) : !1 !== u.events.trigger("node.remove", [M(n)]) && (M(n).before(M.FE.MARKERS), M(n).remove()), M(e).remove()
                } else if (M.FE.NO_DELETE_TAGS.indexOf(n.tagName) < 0 && (u.node.isEditable(n) || u.node.isDeletable(n))) if (u.node.isDeletable(n)) M(e).replaceWith(M.FE.MARKERS), M(n).remove();
                else if (u.node.isList(n)) e.previousSibling ? (M(n).find("li:first").prepend(e), u.cursorLists._backspace(e)) : (M(n).find("li:first").prepend(M.FE.MARKERS), M(e).remove());
                else if ((t = u.node.contents(n)) && "BR" == t[0].tagName && M(t[0]).remove(), t && "BLOCKQUOTE" == n.tagName) {
                    var r = t[0];
                    for (M(e).before(M.FE.MARKERS); r && "BR" != r.tagName;) {
                        var o = r;
                        r = r.nextSibling, M(e).before(o)
                    }
                    r && "BR" == r.tagName && M(r).remove()
                } else M(e).after(M(n).html()).after(M.FE.MARKERS), M(n).remove()
            }
            function f() {
                for (var e = u.el.querySelectorAll("blockquote:empty"), t = 0; t < e.length; t++) e[t].parentNode.removeChild(e[t])
            }
            function p(e, t, n) {
                var r, o = u.node.deepestParent(e, [], !n);
                if (o && "BLOCKQUOTE" == o.tagName) return h(e, o) ? ((r = u.html.defaultTag()) ? M(o).after("<" + r + ">" + M.FE.MARKERS + "<br></" + r + ">") : M(o).after(M.FE.MARKERS + "<br>"), M(e).remove()) : m(e, t, n), !1;
                if (null == o)(r = u.html.defaultTag()) && u.node.isElement(e.parentNode) ? M(e).replaceWith("<" + r + ">" + M.FE.MARKERS + "<br></" + r + ">") : !e.previousSibling || M(e.previousSibling).is("br") || e.nextSibling ? M(e).replaceWith("<br>" + M.FE.MARKERS) : M(e).replaceWith("<br>" + M.FE.MARKERS + "<br>");
                else {
                    var i = e,
                        a = "";
                    u.node.isBlock(o) && !t || (a = "<br/>");
                    var s, l = "",
                        d = "",
                        c = "",
                        f = "";
                    (r = u.html.defaultTag()) && u.node.isBlock(o) && (c = "<" + r + ">", f = "</" + r + ">", o.tagName == r.toUpperCase() && (c = u.node.openTagString(M(o).clone().removeAttr("id").get(0))));
                    do {
                        if (i = i.parentNode, !t || i != o || t && !u.node.isBlock(o)) if (l += u.node.closeTagString(i), i == o && u.node.isBlock(o)) d = c + d;
                        else {
                            var p = "A" == i.tagName && h(e, i) ? "fr-to-remove" : "";
                            d = u.node.openTagString(M(i).clone().addClass(p).get(0)) + d
                        }
                    } while (i != o);
                    a = l + a + d + (e.parentNode == o && u.node.isBlock(o) ? "" : M.FE.INVISIBLE_SPACE) + M.FE.MARKERS, u.node.isBlock(o) && !M(o).find("*:last").is("br") && M(o).append("<br/>"), M(e).after('<span id="fr-break"></span>'), M(e).remove(), o.nextSibling && !u.node.isBlock(o.nextSibling) || u.node.isBlock(o) || M(o).after("<br>"), s = (s = !t && u.node.isBlock(o) ? u.node.openTagString(o) + M(o).html() + f : u.node.openTagString(o) + M(o).html() + u.node.closeTagString(o)).replace(/<span id="fr-break"><\/span>/g, a), M(o).replaceWith(s)
                }
            }
            function m(e, t, n) {
                var r = u.node.deepestParent(e, [], !n);
                if (null == r) u.html.defaultTag() && e.parentNode === u.el ? M(e).replaceWith("<" + u.html.defaultTag() + ">" + M.FE.MARKERS + "<br></" + u.html.defaultTag() + ">") : (e.nextSibling && !u.node.isBlock(e.nextSibling) || M(e).after("<br>"), M(e).replaceWith("<br>" + M.FE.MARKERS));
                else {
                    var o = e,
                        i = "";
                    "PRE" == r.tagName && (t = !0), u.node.isBlock(r) && !t || (i = "<br>");
                    var a = "",
                        s = "";
                    do {
                        var l = o;
                        if (o = o.parentNode, "BLOCKQUOTE" == r.tagName && u.node.isEmpty(l) && !u.node.hasClass(l, "fr-marker") && 0 < M(l).find(e).length && M(l).after(e), ("BLOCKQUOTE" != r.tagName || !h(e, o) && !g(e, o)) && (!t || o != r || t && !u.node.isBlock(r))) {
                            a += u.node.closeTagString(o);
                            var d = "A" == o.tagName && h(e, o) ? "fr-to-remove" : "";
                            s = u.node.openTagString(M(o).clone().addClass(d).removeAttr("id").get(0)) + s
                        }
                    } while (o != r);
                    var c = r == e.parentNode && u.node.isBlock(r) || e.nextSibling;
                    if ("BLOCKQUOTE" == r.tagName) {
                        e.previousSibling && u.node.isBlock(e.previousSibling) && e.nextSibling && "BR" == e.nextSibling.tagName && (M(e.nextSibling).after(e), e.nextSibling && "BR" == e.nextSibling.tagName && M(e.nextSibling).remove());
                        var f = u.html.defaultTag();
                        i = a + i + (f ? "<" + f + ">" : "") + M.FE.MARKERS + "<br>" + (f ? "</" + f + ">" : "") + s
                    } else i = a + i + s + (c ? "" : M.FE.INVISIBLE_SPACE) + M.FE.MARKERS;
                    M(e).replaceWith('<span id="fr-break"></span>');
                    var p = u.node.openTagString(r) + M(r).html() + u.node.closeTagString(r);
                    p = p.replace(/<span id="fr-break"><\/span>/g, i), M(r).replaceWith(p)
                }
            }
            return {
                enter: function(t) {
                    var n = u.markers.insert();
                    if (!n) return !0;
                    u.el.normalize();
                    var r = !1;
                    0 < M(n).parentsUntil(u.$el, "BLOCKQUOTE").length && (r = !(t = !1)), M(n).parentsUntil(u.$el, "TD, TH").length && (r = !1), i(n) ? !s(n) || t || r ? p(n, t, r) : u.cursorLists._endEnter(n) : a(n) ? !s(n) || t || r ?
                        function e(t, n, r) {
                            var o, i = u.node.deepestParent(t, [], !r);
                            if (i && "TABLE" == i.tagName) return M(i).find("td:first, th:first").prepend(t), e(t, n, r);
                            if (i && "BLOCKQUOTE" == i.tagName) {
                                if (g(t, i)) return (o = u.html.defaultTag()) ? M(i).before("<" + o + ">" + M.FE.MARKERS + "<br></" + o + ">") : M(i).before(M.FE.MARKERS + "<br>"), M(t).remove(), !1;
                                h(t, i) ? p(t, n, !0) : m(t, n, !0)
                            }
                            if (null == i)(o = u.html.defaultTag()) && u.node.isElement(t.parentNode) ? M(t).replaceWith("<" + o + ">" + M.FE.MARKERS + "<br></" + o + ">") : M(t).replaceWith("<br>" + M.FE.MARKERS);
                            else {
                                if (u.node.isBlock(i)) if ("PRE" == i.tagName && (n = !0), n) M(t).remove(), M(i).prepend("<br>" + M.FE.MARKERS);
                                else {
                                    if (u.node.isEmpty(i, !0)) return p(t, n, r);
                                    if (u.opts.keepFormatOnDelete) {
                                        for (var a = t, s = M.FE.INVISIBLE_SPACE; a != i && !u.node.isElement(a);) a = a.parentNode, s = u.node.openTagString(a) + s + u.node.closeTagString(a);
                                        M(i).before(s)
                                    } else M(i).before(u.node.openTagString(M(i).clone().removeAttr("id").get(0)) + "<br>" + u.node.closeTagString(i))
                                } else M(i).before("<br>");
                                M(t).remove()
                            }
                        }(n, t, r) : u.cursorLists._startEnter(n) : !s(n) || t || r ? m(n, t, r) : u.cursorLists._middleEnter(n), u.$el.find(".fr-to-remove").each(function() {
                        for (var e = u.node.contents(this), t = 0; t < e.length; t++) e[t].nodeType == Node.TEXT_NODE && (e[t].textContent = e[t].textContent.replace(/\u200B/g, ""));
                        M(this).replaceWith(this.innerHTML)
                    }), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists()), u.spaces.normalizeAroundCursor(), u.selection.restore()
                },
                backspace: function() {
                    var e = !1,
                        t = u.markers.insert();
                    if (!t) return !0;
                    for (var n = t.parentNode; n && !u.node.isElement(n);) {
                        if ("false" === n.getAttribute("contenteditable")) return M(t).replaceWith(M.FE.MARKERS), u.selection.restore(), !1;
                        if ("true" === n.getAttribute("contenteditable")) break;
                        n = n.parentNode
                    }
                    u.el.normalize();
                    var r = t.previousSibling;
                    if (r) {
                        var o = r.textContent;
                        o && o.length && 8203 == o.charCodeAt(o.length - 1) && (1 == o.length ? M(r).remove() : r.textContent = r.textContent.substr(0, o.length - d(o)))
                    }
                    return i(t) ? e = c(t) : a(t) ? s(t) && g(t, M(t).parents("li:first").get(0)) ? u.cursorLists._backspace(t) : function(e) {
                        for (var t = 0 < M(e).parentsUntil(u.$el, "BLOCKQUOTE").length, n = u.node.deepestParent(e, [], !t), r = n; n && !n.previousSibling && "BLOCKQUOTE" != n.tagName && n.parentElement != u.el && !u.node.hasClass(n.parentElement, "fr-inner") && M.FE.SIMPLE_ENTER_TAGS.indexOf(n.parentElement.tagName) < 0;) n = n.parentElement;
                        if (n && "BLOCKQUOTE" == n.tagName) {
                            var o = u.node.deepestParent(e, [M(e).parentsUntil(u.$el, "BLOCKQUOTE").get(0)]);
                            o && o.previousSibling && (r = n = o)
                        }
                        if (null !== n) {
                            var i, a = n.previousSibling;
                            if (u.node.isBlock(n) && u.node.isEditable(n) && a && M.FE.NO_DELETE_TAGS.indexOf(a.tagName) < 0) if (u.node.isDeletable(a)) M(a).remove(), M(e).replaceWith(M.FE.MARKERS);
                            else if (u.node.isEditable(a)) if (u.node.isBlock(a)) if (u.node.isEmpty(a) && !u.node.isList(a)) M(a).remove(), M(e).after(u.opts.keepFormatOnDelete ? M.FE.INVISIBLE_SPACE : "");
                            else {
                                if (u.node.isList(a) && (a = M(a).find("li:last").get(0)), (i = u.node.contents(a)).length && "BR" == i[i.length - 1].tagName && M(i[i.length - 1]).remove(), "BLOCKQUOTE" == a.tagName && "BLOCKQUOTE" != n.tagName) for (i = u.node.contents(a); i.length && u.node.isBlock(i[i.length - 1]);) a = i[i.length - 1], i = u.node.contents(a);
                                else if ("BLOCKQUOTE" != a.tagName && "BLOCKQUOTE" == n.tagName) for (i = u.node.contents(n); i.length && u.node.isBlock(i[0]);) n = i[0], i = u.node.contents(n);
                                if (u.node.isEmpty(n)) M(e).remove(), u.selection.setAtEnd(a, !0);
                                else {
                                    M(e).replaceWith(M.FE.MARKERS);
                                    var s = a.childNodes;
                                    u.node.isBlock(s[s.length - 1]) ? M(s[s.length - 1]).append(r.innerHTML) : M(a).append(r.innerHTML)
                                }
                                M(r).remove(), u.node.isEmpty(n) && M(n).remove()
                            } else M(e).replaceWith(M.FE.MARKERS), "BLOCKQUOTE" == n.tagName && a.nodeType == Node.ELEMENT_NODE ? M(a).remove() : (M(a).after(u.node.isEmpty(n) ? "" : M(n).html()), M(n).remove(), "BR" == a.tagName && M(a).remove())
                        }
                    }(t) : e = c(t), M(t).remove(), f(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists(), u.spaces.normalizeAroundCursor()), u.selection.restore(), e
                },
                del: function() {
                    var e = u.markers.insert();
                    if (!e) return !1;
                    if (u.el.normalize(), i(e)) if (s(e)) if (0 === M(e).parents("li:first").find("ul, ol").length) u.cursorLists._del(e);
                    else {
                        var t = M(e).parents("li:first").find("ul:first, ol:first").find("li:first");
                        (t = t.find(u.html.blockTagsQuery()).get(-1) || t).prepend(e), u.cursorLists._backspace(e)
                    } else l(e);
                    else a(e), n(e);
                    M(e).remove(), f(), u.html.fillEmptyBlocks(!0), u.opts.htmlUntouched || (u.html.cleanEmptyTags(), u.clean.lists()), u.spaces.normalizeAroundCursor(), u.selection.restore()
                },
                isAtEnd: h,
                isAtStart: g
            }
        }, M.FE.ENTER_P = 0, M.FE.ENTER_DIV = 1, M.FE.ENTER_BR = 2, M.FE.KEYCODE = {
            BACKSPACE: 8,
            TAB: 9,
            ENTER: 13,
            SHIFT: 16,
            CTRL: 17,
            ALT: 18,
            ESC: 27,
            SPACE: 32,
            ARROW_LEFT: 37,
            ARROW_UP: 38,
            ARROW_RIGHT: 39,
            ARROW_DOWN: 40,
            DELETE: 46,
            ZERO: 48,
            ONE: 49,
            TWO: 50,
            THREE: 51,
            FOUR: 52,
            FIVE: 53,
            SIX: 54,
            SEVEN: 55,
            EIGHT: 56,
            NINE: 57,
            FF_SEMICOLON: 59,
            FF_EQUALS: 61,
            QUESTION_MARK: 63,
            A: 65,
            B: 66,
            C: 67,
            D: 68,
            E: 69,
            F: 70,
            G: 71,
            H: 72,
            I: 73,
            J: 74,
            K: 75,
            L: 76,
            M: 77,
            N: 78,
            O: 79,
            P: 80,
            Q: 81,
            R: 82,
            S: 83,
            T: 84,
            U: 85,
            V: 86,
            W: 87,
            X: 88,
            Y: 89,
            Z: 90,
            META: 91,
            NUM_ZERO: 96,
            NUM_ONE: 97,
            NUM_TWO: 98,
            NUM_THREE: 99,
            NUM_FOUR: 100,
            NUM_FIVE: 101,
            NUM_SIX: 102,
            NUM_SEVEN: 103,
            NUM_EIGHT: 104,
            NUM_NINE: 105,
            NUM_MULTIPLY: 106,
            NUM_PLUS: 107,
            NUM_MINUS: 109,
            NUM_PERIOD: 110,
            NUM_DIVISION: 111,
            F1: 112,
            F2: 113,
            F3: 114,
            F4: 115,
            F5: 116,
            F6: 117,
            F7: 118,
            F8: 119,
            F9: 120,
            F10: 121,
            F11: 122,
            F12: 123,
            FF_HYPHEN: 173,
            SEMICOLON: 186,
            DASH: 189,
            EQUALS: 187,
            COMMA: 188,
            HYPHEN: 189,
            PERIOD: 190,
            SLASH: 191,
            APOSTROPHE: 192,
            TILDE: 192,
            SINGLE_QUOTE: 222,
            OPEN_SQUARE_BRACKET: 219,
            BACKSLASH: 220,
            CLOSE_SQUARE_BRACKET: 221,
            IME: 229
        }, M.extend(M.FE.DEFAULTS, {
            enter: M.FE.ENTER_P,
            multiLine: !0,
            tabSpaces: 0
        }), M.FE.MODULES.keys = function(l) {
            var d, n, r, c = !1;

            function e() {
                if (l.browser.mozilla && l.selection.isCollapsed() && !c) {
                    var e = l.selection.ranges(0),
                        t = e.startContainer,
                        n = e.startOffset;
                    t && t.nodeType == Node.TEXT_NODE && n <= t.textContent.length && 0 < n && 32 == t.textContent.charCodeAt(n - 1) && (l.selection.save(), l.spaces.normalize(), l.selection.restore())
                }
            }
            function t() {
                l.selection.isFull() && setTimeout(function() {
                    var e = l.html.defaultTag();
                    e ? l.$el.html("<" + e + ">" + M.FE.MARKERS + "<br/></" + e + ">") : l.$el.html(M.FE.MARKERS + "<br/>"), l.selection.restore(), l.placeholder.refresh(), l.button.bulkRefresh(), l.undo.saveStep()
                }, 0)
            }
            function o() {
                c = !1
            }
            function i() {
                c = !1
            }
            function f() {
                var e = l.html.defaultTag();
                e ? l.$el.html("<" + e + ">" + M.FE.MARKERS + "<br/></" + e + ">") : l.$el.html(M.FE.MARKERS + "<br/>"), l.selection.restore()
            }
            function a(e) {
                var t = l.selection.element();
                if (t && 0 <= ["INPUT", "TEXTAREA"].indexOf(t.tagName)) return !0;
                l.events.disableBlur(), null;
                var n = e.which;
                if (16 === n) return !0;
                if ((d = n) === M.FE.KEYCODE.IME) return c = !0;
                c = !1;
                var r, o, i, a = h(n) && !u(e) && !e.altKey,
                    s = n == M.FE.KEYCODE.BACKSPACE || n == M.FE.KEYCODE.DELETE;
                if ((l.selection.isFull() && !l.opts.keepFormatOnDelete && !l.placeholder.isVisible() || s && l.placeholder.isVisible() && l.opts.keepFormatOnDelete) && (a || s) && (f(), !h(n))) return e.preventDefault(), !0;
                n == M.FE.KEYCODE.ENTER ? e.shiftKey ? ((i = e).preventDefault(), i.stopPropagation(), l.opts.multiLine && (l.selection.isCollapsed() || l.selection.remove(), l.cursor.enter(!0))) : (o = e, l.opts.multiLine ? (l.helpers.isIOS() || (o.preventDefault(), o.stopPropagation()), l.selection.isCollapsed() || l.selection.remove(), l.cursor.enter()) : (o.preventDefault(), o.stopPropagation())) : n === M.FE.KEYCODE.BACKSPACE && (e.metaKey || e.ctrlKey) ? setTimeout(function() {
                    l.events.disableBlur(), l.events.focus()
                }, 0) : n != M.FE.KEYCODE.BACKSPACE || u(e) || e.altKey ? n != M.FE.KEYCODE.DELETE || u(e) || e.altKey || e.shiftKey ? n == M.FE.KEYCODE.SPACE ?
                    function(e) {
                        var t = l.selection.element();
                        if (!l.helpers.isMobile() && t && "A" == t.tagName) {
                            e.preventDefault(), e.stopPropagation(), l.selection.isCollapsed() || l.selection.remove();
                            var n = l.markers.insert();
                            if (n) {
                                var r = n.previousSibling;
                                !n.nextSibling && n.parentNode && "A" == n.parentNode.tagName ? (n.parentNode.insertAdjacentHTML("afterend", "&nbsp;" + M.FE.MARKERS), n.parentNode.removeChild(n)) : (r && r.nodeType == Node.TEXT_NODE && 1 == r.textContent.length && 160 == r.textContent.charCodeAt(0) ? r.textContent = r.textContent + " " : n.insertAdjacentHTML("beforebegin", "&nbsp;"), n.outerHTML = M.FE.MARKERS), l.selection.restore()
                            }
                        }
                    }(e) : n == M.FE.KEYCODE.TAB ?
                    function(e) {
                        if (0 < l.opts.tabSpaces) if (l.selection.isCollapsed()) {
                            l.undo.saveStep(), e.preventDefault(), e.stopPropagation();
                            for (var t = "", n = 0; n < l.opts.tabSpaces; n++) t += "&nbsp;";
                            l.html.insert(t), l.placeholder.refresh(), l.undo.saveStep()
                        } else e.preventDefault(), e.stopPropagation(), e.shiftKey ? l.commands.outdent() : l.commands.indent()
                    }(e) : u(e) || !h(e.which) || l.selection.isCollapsed() || e.ctrlKey || l.selection.remove() : l.placeholder.isVisible() ? (l.opts.keepFormatOnDelete || f(), e.preventDefault(), e.stopPropagation()) : ((r = e).preventDefault(), r.stopPropagation(), "" === l.selection.text() ? l.cursor.del() : l.selection.remove(), l.placeholder.refresh()) : l.placeholder.isVisible() ? (l.opts.keepFormatOnDelete || f(), e.preventDefault(), e.stopPropagation()) : function(e) {
                    if (l.selection.isCollapsed()) if (l.cursor.backspace(), l.helpers.isIOS()) {
                        var t = l.selection.ranges(0);
                        t.deleteContents(), t.insertNode(document.createTextNode("​")), l.selection.get().modify("move", "forward", "character")
                    } else e.preventDefault(), e.stopPropagation();
                    else e.preventDefault(), e.stopPropagation(), l.selection.remove(), l.html.fillEmptyBlocks();
                    l.placeholder.refresh()
                }(e), l.events.enableBlur()
            }
            function s() {
                if (!l.$wp) return !0;
                var e;
                l.opts.height || l.opts.heightMax ? (e = l.position.getBoundingRect().top, (l.helpers.isIOS() || l.helpers.isAndroid()) && (e -= l.helpers.scrollTop()), l.opts.iframe && (e += l.$iframe.offset().top), e > l.$wp.offset().top - l.helpers.scrollTop() + l.$wp.height() - 20 && l.$wp.scrollTop(e + l.$wp.scrollTop() - (l.$wp.height() + l.$wp.offset().top) + l.helpers.scrollTop() + 20)) : (e = l.position.getBoundingRect().top, l.opts.toolbarBottom && (e += l.opts.toolbarStickyOffset), (l.helpers.isIOS() || l.helpers.isAndroid()) && (e -= l.helpers.scrollTop()), l.opts.iframe && (e += l.$iframe.offset().top, e -= l.helpers.scrollTop()), (e += l.opts.toolbarStickyOffset) > l.o_win.innerHeight - 20 && M(l.o_win).scrollTop(e + l.helpers.scrollTop() - l.o_win.innerHeight + 20), e = l.position.getBoundingRect().top, l.opts.toolbarBottom || (e -= l.opts.toolbarStickyOffset), (l.helpers.isIOS() || l.helpers.isAndroid()) && (e -= l.helpers.scrollTop()), l.opts.iframe && (e += l.$iframe.offset().top, e -= l.helpers.scrollTop()), e < l.$tb.height() + 20 && M(l.o_win).scrollTop(e + l.helpers.scrollTop() - l.$tb.height() - 20))
            }
            function p(e) {
                var t = l.selection.element();
                if (t && 0 <= ["INPUT", "TEXTAREA"].indexOf(t.tagName)) return !0;
                if (e && 0 === e.which && d && (e.which = d), l.helpers.isAndroid() && l.browser.mozilla) return !0;
                if (c) return !1;
                if (e && l.helpers.isIOS() && e.which == M.FE.KEYCODE.ENTER && l.doc.execCommand("delete"), !l.selection.isCollapsed()) return !0;
                if (e && (e.which === M.FE.KEYCODE.META || e.which == M.FE.KEYCODE.CTRL)) return !0;
                if (e && g(e.which)) return !0;
                e && !l.helpers.isIOS() && (e.which == M.FE.KEYCODE.ENTER || e.which == M.FE.KEYCODE.BACKSPACE || 37 <= e.which && e.which <= 40 && !l.browser.msie) && s();
                var n, r = l.selection.element();
                !
                    function(e) {
                        if (!e) return !1;
                        var t = e.innerHTML;
                        return !!((t = t.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi, "")) && /\u200B/.test(t) && 0 < t.replace(/\u200B/gi, "").length)
                    }(r) || l.node.hasClass(r, "fr-marker") || "IFRAME" == r.tagName || (n = r, l.helpers.isIOS() && 0 !== ((n.textContent || "").match(/[\u3041-\u3096\u30A0-\u30FF\u4E00-\u9FFF\u3130-\u318F\uAC00-\uD7AF]/gi) || []).length) || (l.selection.save(), function(e) {
                    for (var t = l.doc.createTreeWalker(e, NodeFilter.SHOW_TEXT, l.node.filter(function(e) {
                        return /\u200B/gi.test(e.textContent)
                    }), !1); t.nextNode();) {
                        var n = t.currentNode;
                        n.textContent = n.textContent.replace(/\u200B/gi, "")
                    }
                }(r), l.selection.restore())
            }
            function u(e) {
                if (-1 != navigator.userAgent.indexOf("Mac OS X")) {
                    if (e.metaKey && !e.altKey) return !0
                } else if (e.ctrlKey && !e.altKey) return !0;
                return !1
            }
            function g(e) {
                if (e >= M.FE.KEYCODE.ARROW_LEFT && e <= M.FE.KEYCODE.ARROW_DOWN) return !0
            }
            function h(e) {
                if (e >= M.FE.KEYCODE.ZERO && e <= M.FE.KEYCODE.NINE) return !0;
                if (e >= M.FE.KEYCODE.NUM_ZERO && e <= M.FE.KEYCODE.NUM_MULTIPLY) return !0;
                if (e >= M.FE.KEYCODE.A && e <= M.FE.KEYCODE.Z) return !0;
                if (l.browser.webkit && 0 === e) return !0;
                switch (e) {
                    case M.FE.KEYCODE.SPACE:
                    case M.FE.KEYCODE.QUESTION_MARK:
                    case M.FE.KEYCODE.NUM_PLUS:
                    case M.FE.KEYCODE.NUM_MINUS:
                    case M.FE.KEYCODE.NUM_PERIOD:
                    case M.FE.KEYCODE.NUM_DIVISION:
                    case M.FE.KEYCODE.SEMICOLON:
                    case M.FE.KEYCODE.FF_SEMICOLON:
                    case M.FE.KEYCODE.DASH:
                    case M.FE.KEYCODE.EQUALS:
                    case M.FE.KEYCODE.FF_EQUALS:
                    case M.FE.KEYCODE.COMMA:
                    case M.FE.KEYCODE.PERIOD:
                    case M.FE.KEYCODE.SLASH:
                    case M.FE.KEYCODE.APOSTROPHE:
                    case M.FE.KEYCODE.SINGLE_QUOTE:
                    case M.FE.KEYCODE.OPEN_SQUARE_BRACKET:
                    case M.FE.KEYCODE.BACKSLASH:
                    case M.FE.KEYCODE.CLOSE_SQUARE_BRACKET:
                        return !0;
                    default:
                        return !1
                }
            }
            function m(e) {
                var t = e.which;
                if (u(e) || 37 <= t && t <= 40 || !h(t) && t != M.FE.KEYCODE.DELETE && t != M.FE.KEYCODE.BACKSPACE && t != M.FE.KEYCODE.ENTER && t != M.FE.KEYCODE.IME) return !0;
                n || (r = l.snapshot.get(), l.undo.canDo() || l.undo.saveStep()), clearTimeout(n), n = setTimeout(function() {
                    n = null, l.undo.saveStep()
                }, Math.max(250, l.opts.typingTimer))
            }
            function E(e) {
                var t = e.which;
                if (u(e) || 37 <= t && t <= 40) return !0;
                r && n ? (l.undo.saveStep(r), r = null) : void 0 !== t && 0 !== t || r || n || l.undo.saveStep()
            }
            function v(e) {
                if (e && "BR" == e.tagName) return !1;
                try {
                    return 0 === (e.textContent || "").length && e.querySelector && !e.querySelector(":scope > br") || e.childNodes && 1 == e.childNodes.length && e.childNodes[0].getAttribute && ("false" == e.childNodes[0].getAttribute("contenteditable") || l.node.hasClass(e.childNodes[0], "fr-img-caption"))
                } catch (t) {
                    return !1
                }
            }
            function b(e) {
                var t = l.el.childNodes,
                    n = l.html.defaultTag();
                return !(!e.target || e.target === l.el) || (0 === t.length || void(l.$el.outerHeight() - e.offsetY <= 10 ? v(t[t.length - 1]) && (n ? l.$el.append("<" + n + ">" + M.FE.MARKERS + "<br></" + n + ">") : l.$el.append(M.FE.MARKERS + "<br>"), l.selection.restore(), s()) : e.offsetY <= 10 && v(t[0]) && (n ? l.$el.prepend("<" + n + ">" + M.FE.MARKERS + "<br></" + n + ">") : l.$el.prepend(M.FE.MARKERS + "<br>"), l.selection.restore(), s())))
            }
            function S() {
                n && clearTimeout(n)
            }
            return {
                _init: function() {
                    l.events.on("keydown", m), l.events.on("input", e), l.events.on("mousedown", i), l.events.on("keyup input", E), l.events.on("keypress", o), l.events.on("keydown", a), l.events.on("keyup", p), l.events.on("destroy", S), l.events.on("html.inserted", p), l.events.on("cut", t), l.events.on("click", b)
                },
                ctrlKey: u,
                isCharacter: h,
                isArrow: g,
                forceUndo: function() {
                    n && (clearTimeout(n), l.undo.saveStep(), r = null)
                },
                isIME: function() {
                    return c
                },
                isBrowserAction: function(e) {
                    var t = e.which;
                    return u(e) || t == M.FE.KEYCODE.F5
                },
                positionCaret: s
            }
        }, M.FE.MODULES.accessibility = function(f) {
            var i = !0;

            function s(t) {
                t && t.length && !f.$el.find('[contenteditable="true"]').is(":focus") && (t.data("blur-event-set") || t.parents(".fr-popup").length || (f.events.$on(t, "blur", function() {
                    var e = t.parents(".fr-toolbar, .fr-popup").data("instance") || f;
                    e.events.blurActive() && e.events.trigger("blur"), setTimeout(function() {
                        e.events.enableBlur()
                    }, 100)
                }, !0), t.data("blur-event-set", !0)), (t.parents(".fr-toolbar, .fr-popup").data("instance") || f).events.disableBlur(), t.focus(), f.shared.$f_el = t)
            }
            function p(e, t) {
                var n = t ? "last" : "first",
                    r = e.find("button:visible:not(.fr-disabled), .fr-group span.fr-command:visible")[n]();
                if (r.length) return s(r), !0
            }
            function a(e) {
                return e.is("input, textarea, select") && t(), f.events.disableBlur(), e.focus(), !0
            }
            function u(e, t) {
                var n = e.find("input, textarea, button, select").filter(":visible").not(":disabled").filter(t ? ":last" : ":first");
                if (n.length) return a(n);
                if (f.shared.with_kb) {
                    var r = e.find(".fr-active-item:visible:first");
                    if (r.length) return a(r);
                    var o = e.find("[tabIndex]:visible:first");
                    if (o.length) return a(o)
                }
            }
            function t() {
                0 === f.$el.find(".fr-marker").length && f.core.hasFocus() && f.selection.save()
            }
            function l() {
                var e = f.popups.areVisible();
                if (e) {
                    var t = e.find(".fr-buttons");
                    return t.find("button:focus, .fr-group span:focus").length ? !p(e.data("instance").$tb) : !p(t)
                }
                return !p(f.$tb)
            }
            function d() {
                var e = null;
                return f.shared.$f_el.is(".fr-dropdown.fr-active") ? e = f.shared.$f_el : f.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active") && (e = f.shared.$f_el.closest(".fr-dropdown-menu").prev()), e
            }
            function n(e, t, n) {
                if (f.shared.$f_el) {
                    var r = d();
                    r && (f.button.click(r), f.shared.$f_el = r);
                    var o = e.find("button:visible:not(.fr-disabled), .fr-group span.fr-command:visible"),
                        i = o.index(f.shared.$f_el);
                    if (0 === i && !n || i == o.length - 1 && n) {
                        var a;
                        if (t) {
                            if (e.parent().is(".fr-popup")) a = !u(e.parent().children().not(".fr-buttons"), !n);
                            !1 === a && (f.shared.$f_el = null)
                        }
                        t && !1 === a || p(e, !n)
                    } else s(M(o.get(i + (n ? 1 : -1))));
                    return !1
                }
            }
            function c(e, t) {
                return n(e, t, !0)
            }
            function g(e, t) {
                return n(e, t)
            }
            function h(e) {
                if (f.shared.$f_el) {
                    var t;
                    if (f.shared.$f_el.is(".fr-dropdown.fr-active")) return s(t = e ? f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()), !1;
                    if (f.shared.$f_el.is("a.fr-command")) return (t = e ? f.shared.$f_el.closest("li").nextAll(":visible:first").find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest("li").prevAll(":visible:first").find(".fr-command:not(.fr-disabled)").first()).length || (t = e ? f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first() : f.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()), s(t), !1
                }
            }
            function m() {
                if (f.shared.$f_el) {
                    if (f.shared.$f_el.hasClass("fr-dropdown")) f.button.click(f.shared.$f_el);
                    else if (f.shared.$f_el.is("button.fr-back")) {
                        f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus());
                        var e = f.popups.areVisible(f);
                        e && (f.shared.with_kb = !1), f.button.click(f.shared.$f_el), v(e)
                    } else {
                        if (f.events.disableBlur(), f.button.click(f.shared.$f_el), f.shared.$f_el.attr("data-popup")) {
                            var t = f.popups.areVisible(f);
                            t && t.data("popup-button", f.shared.$f_el)
                        } else if (f.shared.$f_el.attr("data-modal")) {
                            var n = f.modals.areVisible(f);
                            n && n.data("modal-button", f.shared.$f_el)
                        }
                        f.shared.$f_el = null
                    }
                    return !1
                }
            }
            function E() {
                f.shared.$f_el && (f.events.disableBlur(), f.shared.$f_el.blur(), f.shared.$f_el = null), !1 !== f.events.trigger("toolbar.focusEditor") && (f.events.disableBlur(), f.$el.focus(), f.events.focus())
            }
            function r(r) {
                r && r.length && (f.events.$on(r, "keydown", function(e) {
                    if (!M(e.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command")) return !0;
                    var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f;
                    f.shared.with_kb = !0;
                    var n = t.accessibility.exec(e, r);
                    return f.shared.with_kb = !1, n
                }, !0), f.events.$on(r, "mouseenter", "[tabIndex]", function(e) {
                    var t = r.parents(".fr-popup").data("instance") || r.data("instance") || f;
                    if (!i) return e.stopPropagation(), void e.preventDefault();
                    var n = M(e.currentTarget);
                    t.shared.$f_el && t.shared.$f_el.not(n) && t.accessibility.focusEditor()
                }, !0))
            }
            function v(e) {
                var t = e.data("popup-button");
                t && setTimeout(function() {
                    s(t), e.data("popup-button", null)
                }, 0)
            }
            function o(e) {
                var t = f.popups.areVisible(e);
                t && t.data("popup-button", null)
            }
            function e(e) {
                var t = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey;
                if (e.which == M.FE.KEYCODE.F10 && !t && !e.shiftKey && e.altKey) {
                    f.shared.with_kb = !0;
                    var n = f.popups.areVisible(f),
                        r = !1;
                    return n && (r = u(n.children().not(".fr-buttons"))), r || l(), f.shared.with_kb = !1, e.preventDefault(), e.stopPropagation(), !1
                }
                return !0
            }
            return {
                _init: function() {
                    f.$wp ? f.events.on("keydown", e, !0) : f.events.$on(f.$win, "keydown", e, !0), f.events.on("mousedown", function(e) {
                        o(f), f.shared.$f_el && (f.accessibility.restoreSelection(), e.stopPropagation(), f.events.disableBlur(), f.shared.$f_el = null)
                    }, !0), f.events.on("blur", function() {
                        f.shared.$f_el = null, o(f)
                    }, !0)
                },
                registerPopup: function(e) {
                    var d, c, t = f.popups.get(e),
                        n = (d = e, c = f.popups.get(d), {
                            _tiKeydown: function(e) {
                                var t = c.data("instance") || f;
                                if (!1 === t.events.trigger("popup.tab", [e])) return !1;
                                var n = e.which,
                                    r = c.find(":focus:first");
                                if (M.FE.KEYCODE.TAB == n) {
                                    e.preventDefault();
                                    var o = c.children().not(".fr-buttons"),
                                        i = o.find("input, textarea, button, select").filter(":visible").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(),
                                        a = i.indexOf(this) + (e.shiftKey ? -1 : 1);
                                    if (0 <= a && a < i.length) return t.events.disableBlur(), M(i[a]).focus(), e.stopPropagation(), !1;
                                    var s = c.find(".fr-buttons");
                                    if (s.length && p(s, !! e.shiftKey)) return e.stopPropagation(), !1;
                                    if (u(o)) return e.stopPropagation(), !1
                                } else {
                                    if (M.FE.KEYCODE.ENTER != n || !e.target || "TEXTAREA" === e.target.tagName) return M.FE.KEYCODE.ESC == n ? (e.preventDefault(), e.stopPropagation(), t.accessibility.restoreSelection(), t.popups.isVisible(d) && c.find(".fr-back:visible").length ? (t.opts.toolbarInline && (t.events.disableBlur(), t.events.focus()), t.button.exec(c.find(".fr-back:visible:first")), v(c)) : t.popups.isVisible(d) && c.find(".fr-dismiss:visible").length ? t.button.exec(c.find(".fr-dismiss:visible:first")) : (t.popups.hide(d), t.opts.toolbarInline && t.toolbar.showInline(null, !0), v(c)), !1) : M.FE.KEYCODE.SPACE == n && (r.is(".fr-submit") || r.is(".fr-dismiss")) ? (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(r), !0) : t.keys.isBrowserAction(e) ? void e.stopPropagation() : r.is("input[type=text], textarea") ? void e.stopPropagation() : M.FE.KEYCODE.SPACE == n && (r.is(".fr-link-attr") || r.is("input[type=file]")) ? void e.stopPropagation() : (e.stopPropagation(), e.preventDefault(), !1);
                                    var l = null;
                                    0 < c.find(".fr-submit:visible").length ? l = c.find(".fr-submit:visible:first") : c.find(".fr-dismiss:visible").length && (l = c.find(".fr-dismiss:visible:first")), l && (e.preventDefault(), e.stopPropagation(), t.events.disableBlur(), t.button.exec(l))
                                }
                            },
                            _tiMouseenter: function() {
                                var e = c.data("instance") || f;
                                o(e)
                            }
                        });
                    r(t.find(".fr-buttons")), f.events.$on(t, "mouseenter", "tabIndex", n._tiMouseenter, !0), f.events.$on(t.children().not(".fr-buttons"), "keydown", "[tabIndex]", n._tiKeydown, !0), f.popups.onHide(e, function() {
                        (t.data("instance") || f).accessibility.restoreSelection()
                    }), f.popups.onShow(e, function() {
                        i = !1, setTimeout(function() {
                            i = !0
                        }, 0)
                    })
                },
                registerToolbar: r,
                focusToolbarElement: s,
                focusToolbar: p,
                focusContent: u,
                focusPopup: function(r) {
                    var o = r.children().not(".fr-buttons");
                    o.data("mouseenter-event-set") || (f.events.$on(o, "mouseenter", "[tabIndex]", function(e) {
                        var t = r.data("instance") || f;
                        if (!i) return e.stopPropagation(), void e.preventDefault();
                        var n = o.find(":focus:first");
                        n.length && !n.is("input, button, textarea, select") && (t.events.disableBlur(), n.blur(), t.events.disableBlur(), t.events.focus())
                    }), o.data("mouseenter-event-set", !0)), !u(o) && f.shared.with_kb && p(r.find(".fr-buttons"))
                },
                focusModal: function(e) {
                    f.core.hasFocus() || (f.events.disableBlur(), f.events.focus()), f.accessibility.saveSelection(), f.events.disableBlur(), f.$el.blur(), f.selection.clear(), f.events.disableBlur(), f.shared.with_kb ? e.find(".fr-command[tabIndex], [tabIndex]").first().focus() : e.find("[tabIndex]:first").focus()
                },
                focusEditor: E,
                focusPopupButton: v,
                focusModalButton: function(e) {
                    var t = e.data("modal-button");
                    t && setTimeout(function() {
                        s(t), e.data("modal-button", null)
                    }, 0)
                },
                hasFocus: function() {
                    return null != f.shared.$f_el
                },
                exec: function(e, t) {
                    var n = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey,
                        r = e.which,
                        o = !1;
                    return r != M.FE.KEYCODE.TAB || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ARROW_RIGHT || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.TAB || n || !e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ARROW_LEFT || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ARROW_UP || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ARROW_DOWN || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ENTER && r != M.FE.KEYCODE.SPACE || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.ESC || n || e.shiftKey || e.altKey ? r != M.FE.KEYCODE.F10 || n || e.shiftKey || !e.altKey || (o = l()) : o = function(e) {
                        if (f.shared.$f_el) {
                            var t = d();
                            return t ? (f.button.click(t), s(t)) : e.parent().find(".fr-back:visible").length ? (f.shared.with_kb = !1, f.opts.toolbarInline && (f.events.disableBlur(), f.events.focus()), f.button.exec(e.parent().find(".fr-back:visible:first")), v(e.parent())) : f.shared.$f_el.is("button, .fr-group span") && (e.parent().is(".fr-popup") ? (f.accessibility.restoreSelection(), f.shared.$f_el = null, !1 !== f.events.trigger("toolbar.esc") && (f.popups.hide(e.parent()), f.opts.toolbarInline && f.toolbar.showInline(null, !0), v(e.parent()))) : E()), !1
                        }
                    }(t) : o = m() : o = f.shared.$f_el && f.shared.$f_el.is(".fr-dropdown:not(.fr-active)") ? m() : h(!0) : o = h() : o = g(t) : o = g(t, !0) : o = c(t) : o = c(t, !0), f.shared.$f_el || o !== undefined || (o = !0), !o && f.keys.isBrowserAction(e) && (o = !0), !! o || (e.preventDefault(), e.stopPropagation(), !1)
                },
                saveSelection: t,
                restoreSelection: function() {
                    f.$el.find(".fr-marker").length && (f.events.disableBlur(), f.selection.restore(), f.events.enableBlur())
                }
            }
        }, M.FE.MODULES.format = function(h) {
            function l(e, t) {
                var n = "<" + e;
                for (var r in t) t.hasOwnProperty(r) && (n += " " + r + '="' + t[r] + '"');
                return n += ">"
            }
            function f(e, t) {
                var n = e;
                for (var r in t) t.hasOwnProperty(r) && (n += "id" == r ? "#" + t[r] : "class" == r ? "." + t[r] : "[" + r + '="' + t[r] + '"]');
                return n
            }
            function p(e, t) {
                return !(!e || e.nodeType != Node.ELEMENT_NODE) && (e.matches || e.matchesSelector || e.msMatchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.oMatchesSelector).call(e, t)
            }
            function m(e, t, n) {
                if (e) {
                    for (; e.nodeType === Node.COMMENT_NODE;) e = e.nextSibling;
                    if (e) {
                        if (h.node.isBlock(e) && "HR" !== e.tagName) return m(e.firstChild, t, n), !1;
                        for (var r = M(l(t, n)).insertBefore(e), o = e; o && !M(o).is(".fr-marker") && 0 === M(o).find(".fr-marker").length && "UL" != o.tagName && "OL" != o.tagName;) {
                            var i = o;
                            o = o.nextSibling, r.append(i)
                        }
                        if (o)(M(o).find(".fr-marker").length || "UL" == o.tagName || "OL" == o.tagName) && m(o.firstChild, t, n);
                        else {
                            for (var a = r.get(0).parentNode; a && !a.nextSibling && !h.node.isElement(a);) a = a.parentNode;
                            if (a) {
                                var s = a.nextSibling;
                                s && (h.node.isBlock(s) ? "HR" === s.tagName ? m(s.nextSibling, t, n) : m(s.firstChild, t, n) : m(s, t, n))
                            }
                        }
                        r.is(":empty") && r.remove()
                    }
                }
            }
            function n(e, t) {
                var n;
                if (void 0 === t && (t = {}), t.style && delete t.style, h.selection.isCollapsed()) {
                    h.markers.insert(), h.$el.find(".fr-marker").replaceWith(l(e, t) + M.FE.INVISIBLE_SPACE + M.FE.MARKERS + ("</" + e + ">")), h.selection.restore()
                } else {
                    var r;
                    h.selection.save(), m(h.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling, e, t);
                    do {
                        for (r = h.$el.find(f(e, t) + " > " + f(e, t)), n = 0; n < r.length; n++) r[n].outerHTML = r[n].innerHTML
                    } while (r.length);
                    h.el.normalize();
                    var o = h.el.querySelectorAll(".fr-marker");
                    for (n = 0; n < o.length; n++) {
                        var i = M(o[n]);
                        !0 === i.data("type") ? p(i.get(0).nextSibling, f(e, t)) && i.next().prepend(i) : p(i.get(0).previousSibling, f(e, t)) && i.prev().append(i)
                    }
                    h.selection.restore()
                }
            }
            function E(e, t, n, r) {
                if (!r) {
                    var o = !1;
                    if (!0 === e.data("type")) for (; h.node.isFirstSibling(e.get(0)) && !e.parent().is(h.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().before(e), o = !0;
                    else if (!1 === e.data("type")) for (; h.node.isLastSibling(e.get(0)) && !e.parent().is(h.$el) && !e.parent().is("ol") && !e.parent().is("ul");) e.parent().after(e), o = !0;
                    if (o) return !0
                }
                if (e.parents(t).length || void 0 === t) {
                    var i = "",
                        a = "",
                        s = e.parent();
                    if (s.is(h.$el) || h.node.isBlock(s.get(0))) return !1;
                    for (; !h.node.isBlock(s.parent().get(0)) && (void 0 === t || void 0 !== t && !p(s.get(0), f(t, n)));) i += h.node.closeTagString(s.get(0)), a = h.node.openTagString(s.get(0)) + a, s = s.parent();
                    var l = e.get(0).outerHTML;
                    e.replaceWith('<span id="mark"></span>');
                    var d = s.html().replace(/<span id="mark"><\/span>/, i + h.node.closeTagString(s.get(0)) + a + l + i + h.node.openTagString(s.get(0)) + a);
                    return s.replaceWith(h.node.openTagString(s.get(0)) + d + h.node.closeTagString(s.get(0))), !0
                }
                return !1
            }
            function r(t, n) {
                void 0 === n && (n = {}), n.style && delete n.style;
                var r = h.selection.isCollapsed();
                h.selection.save();
                for (var o = !0; o;) {
                    o = !1;
                    for (var i = h.$el.find(".fr-marker"), a = 0; a < i.length; a++) {
                        var s = M(i[a]),
                            l = null;
                        if (s.attr("data-cloned") || r || (l = s.clone().removeClass("fr-marker").addClass("fr-clone"), !0 === s.data("type") ? s.attr("data-cloned", !0).after(l) : s.attr("data-cloned", !0).before(l)), E(s, t, n, r)) {
                            o = !0;
                            break
                        }
                    }
                }!
                    function e(t, n, r, o) {
                        for (var i = h.node.contents(t.get(0)), a = 0; a < i.length; a++) {
                            var s = i[a];
                            if (h.node.hasClass(s, "fr-marker")) n = (n + 1) % 2;
                            else if (n) if (0 < M(s).find(".fr-marker").length) n = e(M(s), n, r, o);
                            else {
                                for (var l = M(s).find(r || "*:not(a):not(br)"), d = l.length - 1; 0 <= d; d--) {
                                    var c = l[d];
                                    h.node.isBlock(c) || h.node.isVoid(c) || void 0 !== r && !p(c, f(r, o)) ? h.node.isBlock(c) && void 0 === r && "TABLE" != s.tagName && h.node.clearAttributes(c) : h.node.hasClass(c, "fr-clone") || (c.outerHTML = c.innerHTML)
                                }
                                void 0 === r && s.nodeType == Node.ELEMENT_NODE && !h.node.isVoid(s) || p(s, f(r, o)) ? M(s).replaceWith(s.innerHTML) : void 0 === r && s.nodeType == Node.ELEMENT_NODE && h.node.isBlock(s) && "TABLE" != s.tagName && h.node.clearAttributes(s)
                            } else 0 < M(s).find(".fr-marker").length && (n = e(M(s), n, r, o))
                        }
                        return n
                    }(h.$el, 0, t, n), r || (h.$el.find(".fr-marker").remove(), h.$el.find(".fr-clone").removeClass("fr-clone").addClass("fr-marker")), r && h.$el.find(".fr-marker").before(M.FE.INVISIBLE_SPACE).after(M.FE.INVISIBLE_SPACE), h.html.cleanEmptyTags(), h.el.normalize(), h.selection.restore()
            }
            function t(e, t) {
                var n, r, o, i, a, s = null;
                if (h.selection.isCollapsed()) {
                    h.markers.insert();
                    var l = (r = h.$el.find(".fr-marker")).parent();
                    if (h.node.openTagString(l.get(0)) == '<span style="' + e + ": " + l.css(e) + ';">') {
                        if (h.node.isEmpty(l.get(0))) s = M('<span style="' + e + ": " + t + ';">' + M.FE.INVISIBLE_SPACE + M.FE.MARKERS + "</span>"), l.replaceWith(s);
                        else {
                            var d = {};
                            d["style*"] = e + ":", E(r, "span", d, !0), r = h.$el.find(".fr-marker"), t ? (s = M('<span style="' + e + ": " + t + ';">' + M.FE.INVISIBLE_SPACE + M.FE.MARKERS + "</span>"), r.replaceWith(s)) : r.replaceWith(M.FE.INVISIBLE_SPACE + M.FE.MARKERS)
                        }
                        h.html.cleanEmptyTags()
                    } else h.node.isEmpty(l.get(0)) && l.is("span") ? (r.replaceWith(M.FE.MARKERS), l.css(e, t)) : (s = M('<span style="' + e + ": " + t + ';">' + M.FE.INVISIBLE_SPACE + M.FE.MARKERS + "</span>"), r.replaceWith(s));
                    s && v(s, e, t)
                } else {
                    if (h.selection.save(), null == t || "color" == e && 0 < h.$el.find(".fr-marker").parents("u, a").length) {
                        var c = h.$el.find(".fr-marker");
                        for (n = 0; n < c.length; n++) if (!0 === (r = M(c[n])).data("type")) for (; h.node.isFirstSibling(r.get(0)) && !r.parent().is(h.$el) && !h.node.isElement(r.parent().get(0)) && !h.node.isBlock(r.parent().get(0));) r.parent().before(r);
                        else for (; h.node.isLastSibling(r.get(0)) && !r.parent().is(h.$el) && !h.node.isElement(r.parent().get(0)) && !h.node.isBlock(r.parent().get(0));) r.parent().after(r)
                    }
                    var f = h.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling,
                        p = {
                            "class": "fr-unprocessed"
                        };
                    for (t && (p.style = e + ": " + t + ";"), m(f, "span", p), h.$el.find(".fr-marker + .fr-unprocessed").each(function() {
                        M(this).prepend(M(this).prev())
                    }), h.$el.find(".fr-unprocessed + .fr-marker").each(function() {
                        M(this).prev().append(this)
                    }), (t || "").match(/\dem$/) && h.$el.find("span.fr-unprocessed").removeClass("fr-unprocessed"); 0 < h.$el.find("span.fr-unprocessed").length;) {
                        if ((s = h.$el.find("span.fr-unprocessed:first").removeClass("fr-unprocessed")).parent().get(0).normalize(), s.parent().is("span") && 1 == s.parent().get(0).childNodes.length) {
                            s.parent().css(e, t);
                            var u = s;
                            s = s.parent(), u.replaceWith(u.html())
                        }
                        var g = s.find("span");
                        for (n = g.length - 1; 0 <= n; n--) o = g[n], i = e, a = void 0, (a = M(o)).css(i, ""), "" === a.attr("style") && a.replaceWith(a.html());
                        v(s, e, t)
                    }
                }!
                    function() {
                        var e;
                        for (; 0 < h.$el.find(".fr-split:empty").length;) h.$el.find(".fr-split:empty").remove();
                        h.$el.find(".fr-split").removeClass("fr-split"), h.$el.find('[style=""]').removeAttr("style"), h.$el.find('[class=""]').removeAttr("class"), h.html.cleanEmptyTags(), M(h.$el.find("span").get().reverse()).each(function() {
                            this.attributes && 0 !== this.attributes.length || M(this).replaceWith(this.innerHTML)
                        }), h.el.normalize();
                        var t = h.$el.find("span[style] + span[style]");
                        for (e = 0; e < t.length; e++) {
                            var n = M(t[e]),
                                r = M(t[e]).prev();
                            n.get(0).previousSibling == r.get(0) && h.node.openTagString(n.get(0)) == h.node.openTagString(r.get(0)) && (n.prepend(r.html()), r.remove())
                        }
                        h.$el.find("span[style] span[style]").each(function() {
                            if (0 <= M(this).attr("style").indexOf("font-size")) {
                                var e = M(this).parents("span[style]");
                                0 <= e.attr("style").indexOf("background-color") && (M(this).attr("style", M(this).attr("style") + ";" + e.attr("style")), E(M(this), "span[style]", {}, !1))
                            }
                        }), h.el.normalize(), h.selection.restore()
                    }()
            }
            function v(e, t, n) {
                var r, o, i, a = e.parentsUntil(h.$el, "span[style]"),
                    s = [];
                for (r = a.length - 1; 0 <= r; r--) o = a[r], i = t, 0 === M(o).attr("style").indexOf(i + ":") || 0 <= M(o).attr("style").indexOf(";" + i + ":") || 0 <= M(o).attr("style").indexOf("; " + i + ":") || s.push(a[r]);
                if ((a = a.not(s)).length) {
                    for (var l = "", d = "", c = "", f = "", p = e.get(0); p = p.parentNode, M(p).addClass("fr-split"), l += h.node.closeTagString(p), d = h.node.openTagString(M(p).clone().addClass("fr-split").get(0)) + d, a.get(0) != p && (c += h.node.closeTagString(p), f = h.node.openTagString(M(p).clone().addClass("fr-split").get(0)) + f), a.get(0) != p;);
                    var u = l + h.node.openTagString(M(a.get(0)).clone().css(t, n || "").get(0)) + f + e.css(t, "").get(0).outerHTML + c + "</span>" + d;
                    e.replaceWith('<span id="fr-break"></span>');
                    var g = a.get(0).outerHTML;
                    M(a.get(0)).replaceWith(g.replace(/<span id="fr-break"><\/span>/g, u))
                }
            }
            function o(e, t) {
                void 0 === t && (t = {}), t.style && delete t.style;
                var n = h.selection.ranges(0),
                    r = n.startContainer;
                if (r.nodeType == Node.ELEMENT_NODE && 0 < r.childNodes.length && r.childNodes[n.startOffset] && (r = r.childNodes[n.startOffset]), !n.collapsed && r.nodeType == Node.TEXT_NODE && n.startOffset == (r.textContent || "").length) {
                    for (; !h.node.isBlock(r.parentNode) && !r.nextSibling;) r = r.parentNode;
                    r.nextSibling && (r = r.nextSibling)
                }
                for (var o = r; o && o.nodeType == Node.ELEMENT_NODE && !p(o, f(e, t));) o = o.firstChild;
                if (o && o.nodeType == Node.ELEMENT_NODE && p(o, f(e, t))) return !0;
                var i = r;
                for (i && i.nodeType != Node.ELEMENT_NODE && (i = i.parentNode); i && i.nodeType == Node.ELEMENT_NODE && i != h.el && !p(i, f(e, t));) i = i.parentNode;
                return !(!i || i.nodeType != Node.ELEMENT_NODE || i == h.el || !p(i, f(e, t)))
            }
            return {
                is: o,
                toggle: function(e, t) {
                    o(e, t) ? r(e, t) : n(e, t)
                },
                apply: n,
                remove: r,
                applyStyle: t,
                removeStyle: function(e) {
                    t(e, null)
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            indentMargin: 20
        }), M.FE.COMMANDS = {
            bold: {
                title: "Bold",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("strong");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            italic: {
                title: "Italic",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("em");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            underline: {
                title: "Underline",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("u");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            strikeThrough: {
                title: "Strikethrough",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("s");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            subscript: {
                title: "Subscript",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("sub");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            superscript: {
                title: "Superscript",
                toggle: !0,
                refresh: function(e) {
                    var t = this.format.is("sup");
                    e.toggleClass("fr-active", t).attr("aria-pressed", t)
                }
            },
            outdent: {
                title: "Decrease Indent"
            },
            indent: {
                title: "Increase Indent"
            },
            undo: {
                title: "Undo",
                undo: !1,
                forcedRefresh: !0,
                disabled: !0
            },
            redo: {
                title: "Redo",
                undo: !1,
                forcedRefresh: !0,
                disabled: !0
            },
            insertHR: {
                title: "Insert Horizontal Line"
            },
            clearFormatting: {
                title: "Clear Formatting"
            },
            selectAll: {
                title: "Select All",
                undo: !1
            }
        }, M.FE.RegisterCommand = function(e, t) {
            M.FE.COMMANDS[e] = t
        }, M.FE.MODULES.commands = function(a) {
            function o(e) {
                return a.html.defaultTag() && (e = "<" + a.html.defaultTag() + ">" + e + "</" + a.html.defaultTag() + ">"), e
            }
            var i = {
                bold: function() {
                    e("bold", "strong")
                },
                subscript: function() {
                    a.format.is("sup") && a.format.remove("sup"), e("subscript", "sub")
                },
                superscript: function() {
                    a.format.is("sub") && a.format.remove("sub"), e("superscript", "sup")
                },
                italic: function() {
                    e("italic", "em")
                },
                strikeThrough: function() {
                    e("strikeThrough", "s")
                },
                underline: function() {
                    e("underline", "u")
                },
                undo: function() {
                    a.undo.run()
                },
                redo: function() {
                    a.undo.redo()
                },
                indent: function() {
                    n(1)
                },
                outdent: function() {
                    n(-1)
                },
                show: function() {
                    a.opts.toolbarInline && a.toolbar.showInline(null, !0)
                },
                insertHR: function() {
                    a.selection.remove();
                    var e = "";
                    a.core.isEmpty() && (e = o(e = "<br>")), a.html.insert('<hr id="fr-just">' + e);
                    var t, n = a.$el.find("hr#fr-just");
                    if (n.removeAttr("id"), 0 === n.next().length) {
                        var r = a.html.defaultTag();
                        r ? n.after(M("<" + r + ">").append("<br>")) : n.after("<br>")
                    }
                    n.prev().is("hr") ? t = a.selection.setAfter(n.get(0), !1) : n.next().is("hr") ? t = a.selection.setBefore(n.get(0), !1) : a.selection.setAfter(n.get(0), !1) || a.selection.setBefore(n.get(0), !1), t || void 0 === t || (e = o(e = M.FE.MARKERS + "<br>"), n.after(e)), a.selection.restore()
                },
                clearFormatting: function() {
                    a.format.remove()
                },
                selectAll: function() {
                    a.doc.execCommand("selectAll", !1, !1)
                }
            };

            function t(e, t) {
                if (!1 !== a.events.trigger("commands.before", M.merge([e], t || []))) {
                    var n = M.FE.COMMANDS[e] && M.FE.COMMANDS[e].callback || i[e],
                        r = !0,
                        o = !1;
                    M.FE.COMMANDS[e] && ("undefined" != typeof M.FE.COMMANDS[e].focus && (r = M.FE.COMMANDS[e].focus), "undefined" != typeof M.FE.COMMANDS[e].accessibilityFocus && (o = M.FE.COMMANDS[e].accessibilityFocus)), (!a.core.hasFocus() && r && !a.popups.areVisible() || !a.core.hasFocus() && o && a.accessibility.hasFocus()) && a.events.focus(!0), M.FE.COMMANDS[e] && !1 !== M.FE.COMMANDS[e].undo && (a.$el.find(".fr-marker").length && (a.events.disableBlur(), a.selection.restore()), a.undo.saveStep()), n && n.apply(a, M.merge([e], t || [])), a.events.trigger("commands.after", M.merge([e], t || [])), M.FE.COMMANDS[e] && !1 !== M.FE.COMMANDS[e].undo && a.undo.saveStep()
                }
            }
            function e(e, t) {
                a.format.toggle(t)
            }
            function n(e) {
                a.selection.save(), a.html.wrap(!0, !0, !0, !0), a.selection.restore();
                for (var t = a.selection.blocks(), n = 0; n < t.length; n++) if ("LI" != t[n].tagName && "LI" != t[n].parentNode.tagName) {
                    var r = M(t[n]),
                        o = "rtl" == a.opts.direction || "rtl" == r.css("direction") ? "margin-right" : "margin-left",
                        i = a.helpers.getPX(r.css(o));
                    if (r.width() < 2 * a.opts.indentMargin && 0 < e) continue;
                    r.css(o, Math.max(i + e * a.opts.indentMargin, 0) || ""), r.removeClass("fr-temp-div")
                }
                a.selection.save(), a.html.unwrap(), a.selection.restore()
            }
            function r(e) {
                return function() {
                    t(e)
                }
            }
            var s = {};
            for (var l in i) i.hasOwnProperty(l) && (s[l] = r(l));
            return M.extend(s, {
                exec: t,
                _init: function() {
                    a.events.on("keydown", function(e) {
                        var t = a.selection.element();
                        if (t && "HR" == t.tagName && !a.keys.isArrow(e.which)) return e.preventDefault(), !1
                    }), a.events.on("keyup", function(e) {
                        var t = a.selection.element();
                        if (t && "HR" == t.tagName) if (e.which == M.FE.KEYCODE.ARROW_LEFT || e.which == M.FE.KEYCODE.ARROW_UP) {
                            if (t.previousSibling) return a.node.isBlock(t.previousSibling) ? a.selection.setAtEnd(t.previousSibling) : M(t).before(M.FE.MARKERS), a.selection.restore(), !1
                        } else if ((e.which == M.FE.KEYCODE.ARROW_RIGHT || e.which == M.FE.KEYCODE.ARROW_DOWN) && t.nextSibling) return a.node.isBlock(t.nextSibling) ? a.selection.setAtStart(t.nextSibling) : M(t).after(M.FE.MARKERS), a.selection.restore(), !1
                    }), a.events.on("mousedown", function(e) {
                        if (e.target && "HR" == e.target.tagName) return e.preventDefault(), e.stopPropagation(), !1
                    }), a.events.on("mouseup", function() {
                        var e = a.selection.element();
                        e == a.selection.endElement() && e && "HR" == e.tagName && (e.nextSibling && (a.node.isBlock(e.nextSibling) ? a.selection.setAtStart(e.nextSibling) : M(e).after(M.FE.MARKERS)), a.selection.restore())
                    })
                }
            })
        }, M.FE.MODULES.data = function(f) {
            var p = "RCZB17botVG4A-8yzia1C4A5DG3CD2cFB4qflmCE4I2FB1SC7F6PE4WE3RD6e2A4c1D3d1E2E3ehxdGE3CE2IB2LC1HG2LE1QA3QC7B-13cC-9epmkjc1B4e1C4pgjgvkOC5E1eNE1HB2LD2B-13WD5tvabUA5a1A4f1A2G3C2A-21cihKE3FE2DB2cccJE1iC-7G-7tD-17tVD6A-9qC-7QC7a1E4B4je1E3E2G2ecmsAA1xH-8HB11C1D1lgzQA3dTB8od1D4XE3ohb1B4E4D3mbLA10NA7C-21d1genodKC11PD9PE5tA-8UI3ZC5XB5B-11qXF2F-7wtwjAG3NA1IB1OD1HC1RD4QJ4evUF2D5XG2G4XA8pqocH1F3G2J2hcpHC4D1MD4C1MB8PD5klcQD1A8A6e2A3ed1E2A24A7HC5C3qA-9tiA-61dcC3MD1LE1D4SA3A9ZZXSE4g1C3Pa2C5ufbcGI3I2B4skLF2CA1vxB-22wgUC4kdH-8cVB5iwe1A2D3H3G-7DD5JC2ED2OH2JB10D3C2xHE1KA29PB11wdC-11C4cixb2C7a1C4YYE3B2A15uB-21wpCA1MF1NuC-21dyzD6pPG4I-7pmjc1A4yte1F3B-22yvCC3VbC-7qC-22qNE2hC1vH-8zad1RF6WF3DpI-7C8A-16hpf1F3D2ylalB-13BB2lpA-63IB3uOF6D5G4gabC-21UD2A3PH4ZA20B11b2C6ED4A2H3I1A15DB4KD2laC-8LA5B8B7==",
                u = "NCKB1zwtPA9tqzajXC2c2A7B-16VD3spzJ1C9C3D5oOF2OB1NB1LD7VA5QF4TE3gytXB2A4C-8VA2AC4E1D3GB2EB2KC3KD1MF1juuSB1A8C6yfbmd1B2a1A5qdsdB2tivbC3CB1KC1CH1eLA2sTF1B4I4H-7B-21UB6b1F5bzzzyAB4JC3MG2hjdKC1JE6C1E1cj1pD-16pUE5B4prra2B5ZB3D3C3pxj1EA6A3rnJA2C-7I-7JD9D1E1wYH1F3sTB5TA2G4H4ZA22qZA5BB3mjcvcCC3JB1xillavC-21VE6PC5SI4YC5C8mb1A3WC3BD2B5aoDA2qqAE3A5D-17fOD1D5RD4WC10tE6OAZC3nF-7b1C4A4D3qCF2fgmapcromlHA2QA6a1E1D3e1A6C2bie2F4iddnIA7B2mvnwcIB5OA1DB2OLQA3PB10WC7WC5d1E3uI-7b1D5D6b1E4D2arlAA4EA1F-11srxI-7MB1D7PF1E5B4adB-21YD5vrZH3D3xAC4E1A2GF2CF2J-7yNC2JE1MI2hH-7QB1C6B5B-9bA-7XB13a1B5VievwpKB4LA3NF-10H-9I-8hhaC-16nqPG4wsleTD5zqYF3h1G2B7B4yvGE2Pi1H-7C-21OE6B1uLD1kI4WC1E7C5g1D-8fue1C8C6c1D4D3Hpi1CC4kvGC2E1legallyXB4axVA11rsA4A-9nkdtlmzBA2GD3A13A6CB1dabE1lezrUE6RD5TB4A-7f1C8c1B5d1D4D3tyfCD5C2D2==",
                g = function() {
                    for (var e = 0, t = document.domain, n = t.split("."), r = "_gd" + (new Date).getTime(); e < n.length - 1 && -1 == document.cookie.indexOf(r + "=" + r);) t = n.slice(-1 - ++e).join("."), document.cookie = r + "=" + r + ";domain=" + t + ";";
                    return document.cookie = r + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + t + ";", (t || "").replace(/(^\.*)|(\.*$)/g, "")
                }();

            function h(e) {
                return e
            }
            var m, E, v = h(function(e) {
                if (!e) return e;
                for (var t = "", n = h("charCodeAt"), r = h("fromCharCode"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(e[0]), i = 1; i < e.length - 2; i++) {
                    for (var a = d(++o), s = e[n](i), l = "";
                         /[0-9-]/.test(e[i + 1]);) l += e[++i];
                    s = b(s, a, l = parseInt(l, 10) || 0), s ^= o - 1 & 31, t += String[r](s)
                }
                return t
            });

            function d(e) {
                for (var t = e.toString(), n = 0, r = 0; r < t.length; r++) n += parseInt(t.charAt(r), 10);
                return 10 < n ? n % 9 + 1 : n
            }
            function b(e, t, n) {
                for (var r = Math.abs(n); 0 < r--;) e -= t;
                return n < 0 && (e += 123), e
            }
            function S(e) {
                return !(!e || "block" === e.css("display") || (e.remove(), 0))
            }
            function T(e) {
                return e && 0 === f.$box.find(e).length
            }
            var e = 0;

            function y() {
                if (10 < e && (f[h(v("0ppecjvc=="))](), setTimeout(function() {
                        M.FE = null
                    }, 10)), !f.$box) return !1;
                f.$wp.prepend(v(h(v(u)))), m = f.$wp.find("> div:first"), E = m.find("> a"), "rtl" == f.opts.direction && m.css("left", "auto").css("right", 0).attr("direction", "rtl"), e++
            }
            function N(e) {
                for (var t = [v("9qqG-7amjlwq=="), v("KA3B3C2A6D1D5H5H1A3=="), v("3B9B3B5F3C4G3E3=="), v("QzbzvxyB2yA-9m=="), v("ji1kacwmgG5bc=="), v("nmA-13aogi1A3c1jd==")], n = 0; n < t.length; n++) if (e.endsWith(t[n])) return !0;
                return !1
            }
            return {
                _init: function() {
                    var e = f.o_win.FEK;
                    try {
                        e = e || localStorage && localStorage.FEK
                    } catch (b) {}
                    e = f.opts.key || e || [""];
                    var t = v(h("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9=="));
                    "string" == typeof e && (e = [e]);
                    for (var n, r, o, i = !(f.ul = !0), a = 0, s = 0; s < e.length; s++) {
                        var l = (r = e[s], 3 === (o = (v(r) || "").split("|")).length ? o : [null, null, v(r) || ""]),
                            d = l[2];
                        if (d === v(h(v("mcVRDoB1BGILD7YFe1BTXBA7B6=="))) || 0 <= d.indexOf(g, d.length - g.length) || N(g)) {
                            if (n = l[1], !(new Date(n) < new Date(v("OB1F1A4D3I1A15A11D3E6B5==")) && null !== l[1])) {
                                f.ul = !1;
                                break
                            }
                            i = !0, u = p, a = l[0]
                        } else null === l[0] && 0 < l[2].length && (i = !0, u = p, a = -1)
                    }
                    var c = new Image;
                    !0 === f.ul && (y(), c.src = i ? h(v(t)) + "e=" + a : h(v(t)) + "u"), !0 === f.ul && f.events.on("contentChanged", function() {
                        (S(m) || S(E) || T(m) || T(E)) && y()
                    }), f.events.on("destroy", function() {
                        m && m.length && m.remove()
                    }, !0)
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            pastePlain: !1,
            pasteDeniedTags: ["colgroup", "col", "meta"],
            pasteDeniedAttrs: ["class", "id", "style"],
            pasteAllowedStyleProps: [".*"],
            pasteAllowLocalImages: !1
        }), M.FE.MODULES.paste = function(b) {
            var a, s, o, S;

            function n(e, t) {
                try {
                    b.win.localStorage.setItem("fr-copied-html", e), b.win.localStorage.setItem("fr-copied-text", t)
                } catch (n) {}
            }
            function e(e) {
                var t = b.html.getSelected();
                n(t, M("<div>").html(t).text()), "cut" == e.type && (b.undo.saveStep(), setTimeout(function() {
                    b.selection.save(), b.html.wrap(), b.selection.restore(), b.events.focus(), b.undo.saveStep()
                }, 0))
            }
            var i = !1;

            function t(e) {
                if (i) return !1;
                if (e.originalEvent && (e = e.originalEvent), !1 === b.events.trigger("paste.before", [e])) return e.preventDefault(), !1;
                if (b.$win.scrollTop(), e && e.clipboardData && e.clipboardData.getData) {
                    var t = "",
                        n = e.clipboardData.types;
                    if (b.helpers.isArray(n)) for (var r = 0; r < n.length; r++) t += n[r] + ";";
                    else t = n;
                    if (a = "", /text\/rtf/.test(t) && (s = e.clipboardData.getData("text/rtf")), /text\/html/.test(t) && !b.browser.safari ? a = e.clipboardData.getData("text/html") : /text\/rtf/.test(t) && b.browser.safari ? a = s : /public.rtf/.test(t) && b.browser.safari && (a = e.clipboardData.getData("text/rtf")), "" !== a) return l(), e.preventDefault && (e.stopPropagation(), e.preventDefault()), !1;
                    a = null
                }
                return function() {
                    b.selection.save(), b.events.disableBlur(), a = null, o ? (o.html(""), b.browser.edge && b.opts.iframe && b.$el.append(o)) : (o = M('<div contenteditable="true" style="position: fixed; top: 0; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>'), b.browser.safari ? (o.css("top", b.$sc.scrollTop()), b.$el.after(o)) : b.browser.edge && b.opts.iframe ? b.$el.append(o) : b.$box.after(o), b.events.on("destroy", function() {
                        o.remove()
                    }));
                    o.focus(), b.win.setTimeout(l, 1)
                }(), !1
            }
            function r(e) {
                if (e.originalEvent && (e = e.originalEvent), e && e.dataTransfer && e.dataTransfer.getData) {
                    var t = "",
                        n = e.dataTransfer.types;
                    if (b.helpers.isArray(n)) for (var r = 0; r < n.length; r++) t += n[r] + ";";
                    else t = n;
                    if (a = "", /text\/rtf/.test(t) && (s = e.dataTransfer.getData("text/rtf")), /text\/html/.test(t) ? a = e.dataTransfer.getData("text/html") : /text\/rtf/.test(t) && b.browser.safari ? a = s : /text\/plain/.test(t) && !this.browser.mozilla && (a = b.html.escapeEntities(e.dataTransfer.getData("text/plain")).replace(/\n/g, "<br>")), "" !== a) {
                        b.keys.forceUndo(), S = b.snapshot.get(), b.selection.save(), b.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");
                        var o = b.markers.insertAtPoint(e);
                        if (b.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"), b.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"), b.selection.restore(), b.selection.remove(), b.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"), !1 !== o) {
                            var i = b.el.querySelector(".fr-marker");
                            return M(i).replaceWith(M.FE.MARKERS), b.selection.restore(), l(), e.preventDefault && (e.stopPropagation(), e.preventDefault()), !1
                        }
                    } else a = null
                }
            }
            function l() {
                b.browser.edge && b.opts.iframe && b.$box.after(o), S || (b.keys.forceUndo(), S = b.snapshot.get()), a || (a = o.get(0).innerHTML, b.selection.restore(), b.events.enableBlur());
                var e = a.match(/(class=\"?Mso|class=\'?Mso|class="?Xl|class='?Xl|class=Xl|style=\"[^\"]*\bmso\-|style=\'[^\']*\bmso\-|w:WordDocument)/gi),
                    t = b.events.chainTrigger("paste.beforeCleanup", a);
                t && "string" == typeof t && (a = t), (!e || e && !1 !== b.events.trigger("paste.wordPaste", [a])) && d(a, e)
            }
            function T(e) {
                for (var t = "", n = 0; n++ < e;) t += "&nbsp;";
                return t
            }
            function d(e, t, n) {
                var r, o = null,
                    i = null;
                if (0 <= e.toLowerCase().indexOf("<body")) {
                    var a = "";
                    0 <= e.indexOf("<style") && (a = e.replace(/[.\s\S\w\W<>]*(<style[^>]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi, "$1")), e = (e = a + e.replace(/[.\s\S\w\W<>]*<body[^>]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi, "$1")).replace(/ \n/g, " ").replace(/\n /g, " ").replace(/([^>])\n([^<])/g, "$1 $2")
                }
                var s = !1;
                0 <= e.indexOf('id="docs-internal-guid') && (e = e.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g, "$1"), s = !0);
                var l = !1;
                if (!t && ((l = function(e) {
                        var t = null;
                        try {
                            t = b.win.localStorage.getItem("fr-copied-text")
                        } catch (n) {}
                        return !(!t || M("<div>").html(e).text().replace(/\u00A0/gi, " ").replace(/\r|\n/gi, "") != t.replace(/\u00A0/gi, " ").replace(/\r|\n/gi, ""))
                    }(e)) && (e = b.win.localStorage.getItem("fr-copied-html")), !l)) {
                    var d = b.opts.htmlAllowedStyleProps;
                    b.opts.htmlAllowedStyleProps = b.opts.pasteAllowedStyleProps, b.opts.htmlAllowComments = !1, e = (e = (e = e.replace(/<span class="Apple-tab-span">\s*<\/span>/g, T(b.opts.tabSpaces || 4))).replace(/<span class="Apple-tab-span" style="white-space:pre">(\t*)<\/span>/g, function(e, t) {
                        return T(t.length * (b.opts.tabSpaces || 4))
                    })).replace(/\t/g, T(b.opts.tabSpaces || 4)), e = b.clean.html(e, b.opts.pasteDeniedTags, b.opts.pasteDeniedAttrs), b.opts.htmlAllowedStyleProps = d, b.opts.htmlAllowComments = !0, e = (e = (e = y(e)).replace(/\r/g, "")).replace(/^ */g, "").replace(/ *$/g, "")
                }!t || b.wordPaste && n || (0 === (e = e.replace(/^\n*/g, "").replace(/^ /g, "")).indexOf("<colgroup>") && (e = "<table>" + e + "</table>"), e = y(e = function(e) {
                    var t;
                    e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/<p(.*?)class="?'?MsoListParagraph"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ul><li>$3</li></ul>")).replace(/<p(.*?)class="?'?NumberedText"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ol><li>$3</li></ol>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ul><li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<ol><li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListBullet"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li></ul>")).replace(/<p(.*?)class="?'?NumberedTextCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi, "<li$3>$5</li></ol>")).replace(/<span([^<]*?)style="?'?mso-list:Ignore"?'?([\s\S]*?)>([\s\S]*?)<span/gi, "<span><span")).replace(/<!--\[if \!supportLists\]-->([\s\S]*?)<!--\[endif\]-->/gi, "")).replace(/<!\[if \!supportLists\]>([\s\S]*?)<!\[endif\]>/gi, "")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi, " ")).replace(/<!--[\s\S]*?-->/gi, "")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi, "");
                    var n, r = ["style", "script", "applet", "embed", "noframes", "noscript"];
                    for (t = 0; t < r.length; t++) {
                        var o = new RegExp("<" + r[t] + ".*?" + r[t] + "(.*?)>", "gi");
                        e = e.replace(o, "")
                    }
                    for (e = (e = (e = e.replace(/&nbsp;/gi, " ")).replace(/<td([^>]*)><\/td>/g, "<td$1><br></td>")).replace(/<th([^>]*)><\/th>/g, "<th$1><br></th>");
                         (e = (n = e).replace(/<[^\/>][^>]*><\/[^>]+>/gi, "")) != n;);
                    e = (e = e.replace(/<lilevel([^1])([^>]*)>/gi, '<li data-indent="true"$2>')).replace(/<lilevel1([^>]*)>/gi, "<li$1>"), e = (e = (e = b.clean.html(e, b.opts.pasteDeniedTags, b.opts.pasteDeniedAttrs)).replace(/<a>(.[^<]+)<\/a>/gi, "$1")).replace(/<br> */g, "<br>");
                    var i = b.o_doc.createElement("div");
                    i.innerHTML = e;
                    var a = i.querySelectorAll("li[data-indent]");
                    for (t = 0; t < a.length; t++) {
                        var s = a[t],
                            l = s.previousElementSibling;
                        if (l && "LI" == l.tagName) {
                            var d = l.querySelector(":scope > ul, :scope > ol");
                            d || (d = document.createElement("ul"), l.appendChild(d)), d.appendChild(s)
                        } else s.removeAttribute("data-indent")
                    }
                    return b.html.cleanBlankSpaces(i), e = i.innerHTML
                }(e))), b.opts.pastePlain && !l && (e = function(e) {
                    var t, n = null,
                        r = b.doc.createElement("div");
                    r.innerHTML = e;
                    var o = r.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");
                    for (t = 0; t < o.length; t++)(n = o[t]).outerHTML = "<" + (b.html.defaultTag() || "DIV") + ">" + n.innerHTML + "</" + (b.html.defaultTag() || "DIV") + ">";
                    for (t = (o = r.querySelectorAll("*:not(" + "p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not(") + ")")).length - 1; 0 <= t; t--)(n = o[t]).outerHTML = n.innerHTML;
                    var i = function(e) {
                        for (var t = b.node.contents(e), n = 0; n < t.length; n++) t[n].nodeType != Node.TEXT_NODE && t[n].nodeType != Node.ELEMENT_NODE ? t[n].parentNode.removeChild(t[n]) : i(t[n])
                    };
                    return i(r), r.innerHTML
                }(e));
                var c = b.events.chainTrigger("paste.afterCleanup", e);
                if ("string" == typeof c && (e = c), "" !== e) {
                    var f = b.o_doc.createElement("div");
                    0 <= (f.innerHTML = e).indexOf("<body>") ? (b.html.cleanBlankSpaces(f), b.spaces.normalize(f, !0)) : b.spaces.normalize(f);
                    var p = f.getElementsByTagName("span");
                    for (r = p.length - 1; 0 <= r; r--) {
                        var u = p[r];
                        0 === u.attributes.length && (u.outerHTML = u.innerHTML)
                    }
                    var g = b.selection.element(),
                        h = !1;
                    if (g && M(g).parentsUntil(b.el, "ul, ol").length && (h = !0), h) {
                        var m = f.children;
                        1 == m.length && 0 <= ["OL", "UL"].indexOf(m[0].tagName) && (m[0].outerHTML = m[0].innerHTML)
                    }
                    if (!s) {
                        var E = f.getElementsByTagName("br");
                        for (r = E.length - 1; 0 <= r; r--) {
                            var v = E[r];
                            b.node.isBlock(v.previousSibling) && v.parentNode.removeChild(v)
                        }
                    }
                    if (b.opts.enter == M.FE.ENTER_BR) for (r = (o = f.querySelectorAll("p, div")).length - 1; 0 <= r; r--) 0 === (i = o[r]).attributes.length && (i.outerHTML = i.innerHTML + (i.nextSibling && !b.node.isEmpty(i) ? "<br>" : ""));
                    else if (b.opts.enter == M.FE.ENTER_DIV) for (r = (o = f.getElementsByTagName("p")).length - 1; 0 <= r; r--) 0 === (i = o[r]).attributes.length && (i.outerHTML = "<div>" + i.innerHTML + "</div>");
                    else b.opts.enter == M.FE.ENTER_P && 1 == f.childNodes.length && "P" == f.childNodes[0].tagName && 0 === f.childNodes[0].attributes.length && (f.childNodes[0].outerHTML = f.childNodes[0].innerHTML);
                    e = f.innerHTML, l && (e = function(e) {
                        var t, n = b.o_doc.createElement("div");
                        n.innerHTML = e;
                        var r = n.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(" + M.FE.VOID_ELEMENTS.join("):not(") + "):not(" + b.opts.htmlAllowedEmptyTags.join("):not(") + ")");
                        for (; r.length;) {
                            for (t = 0; t < r.length; t++) r[t].parentNode.removeChild(r[t]);
                            r = n.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(" + M.FE.VOID_ELEMENTS.join("):not(") + "):not(" + b.opts.htmlAllowedEmptyTags.join("):not(") + ")")
                        }
                        return n.innerHTML
                    }(e)), b.html.insert(e, !0)
                }
                b.events.trigger("paste.after"), b.undo.saveStep(S), S = null, b.undo.saveStep()
            }
            function c(e) {
                for (var t = e.length - 1; 0 <= t; t--) e[t].attributes && e[t].attributes.length && e.splice(t, 1);
                return e
            }
            function y(e) {
                var t, n = b.o_doc.createElement("div");
                n.innerHTML = e;
                for (var r = c(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])"))); r.length;) {
                    var o = r[r.length - 1];
                    if (b.html.defaultTag() && "div" != b.html.defaultTag()) o.querySelector(b.html.blockTagsQuery()) ? o.outerHTML = o.innerHTML : o.outerHTML = "<" + b.html.defaultTag() + ">" + o.innerHTML + "</" + b.html.defaultTag() + ">";
                    else {
                        var i = o.querySelectorAll("*");
                        !i.length || "BR" !== i[i.length - 1].tagName && 0 === o.innerText.length ? o.outerHTML = o.innerHTML + "<br>" : o.outerHTML = o.innerHTML
                    }
                    r = c(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))
                }
                for (r = c(Array.prototype.slice.call(n.querySelectorAll("div:not([style])"))); r.length;) {
                    for (t = 0; t < r.length; t++) {
                        var a = r[t],
                            s = a.innerHTML.replace(/\u0009/gi, "").trim();
                        a.outerHTML = s
                    }
                    r = c(Array.prototype.slice.call(n.querySelectorAll("div:not([style])")))
                }
                return n.innerHTML
            }
            function f() {
                b.el.removeEventListener("copy", e), b.el.removeEventListener("cut", e), b.el.removeEventListener("paste", t)
            }
            return {
                _init: function() {
                    b.el.addEventListener("copy", e), b.el.addEventListener("cut", e), b.el.addEventListener("paste", t, {
                        capture: !0
                    }), b.events.on("drop", r), b.browser.msie && b.browser.version < 11 && (b.events.on("mouseup", function(e) {
                        2 == e.button && (setTimeout(function() {
                            i = !1
                        }, 50), i = !0)
                    }, !0), b.events.on("beforepaste", t)), b.events.on("destroy", f)
                },
                cleanEmptyTagsAndDivs: y,
                getRtfClipboard: function() {
                    return s
                },
                saveCopiedText: n,
                clean: d
            }
        }, M.extend(M.FE.DEFAULTS, {
            shortcutsEnabled: [],
            shortcutsHint: !0
        }), M.FE.SHORTCUTS_MAP = {}, M.FE.RegisterShortcut = function(e, t, n, r, o, i) {
            M.FE.SHORTCUTS_MAP[(o ? "^" : "") + (i ? "@" : "") + e] = {
                cmd: t,
                val: n,
                letter: r,
                shift: o,
                option: i
            }, M.FE.DEFAULTS.shortcutsEnabled.push(t)
        }, M.FE.RegisterShortcut(M.FE.KEYCODE.E, "show", null, "E", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.B, "bold", null, "B", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.I, "italic", null, "I", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.U, "underline", null, "U", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.S, "strikeThrough", null, "S", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.CLOSE_SQUARE_BRACKET, "indent", null, "]", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.OPEN_SQUARE_BRACKET, "outdent", null, "[", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.Z, "undo", null, "Z", !1, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.Z, "redo", null, "Z", !0, !1), M.FE.RegisterShortcut(M.FE.KEYCODE.Y, "redo", null, "Y", !1, !1), M.FE.MODULES.shortcuts = function(s) {
            var r = null;
            var l = !1;

            function e(e) {
                if (!s.core.hasFocus()) return !0;
                var t = e.which,
                    n = -1 != navigator.userAgent.indexOf("Mac OS X") ? e.metaKey : e.ctrlKey;
                if ("keyup" == e.type && l && t != M.FE.KEYCODE.META) return l = !1;
                "keydown" == e.type && (l = !1);
                var r = (e.shiftKey ? "^" : "") + (e.altKey ? "@" : "") + t;
                if (n && M.FE.SHORTCUTS_MAP[r]) {
                    var o = M.FE.SHORTCUTS_MAP[r].cmd;
                    if (o && 0 <= s.opts.shortcutsEnabled.indexOf(o)) {
                        var i, a = M.FE.SHORTCUTS_MAP[r].val;
                        if (o && !a ? i = s.$tb.find('.fr-command[data-cmd="' + o + '"]') : o && a && (i = s.$tb.find('.fr-command[data-cmd="' + o + '"][data-param1="' + a + '"]')), i.length) return e.preventDefault(), e.stopPropagation(), i.parents(".fr-toolbar").data("instance", s), "keydown" == e.type && (s.button.exec(i), l = !0), !1;
                        if (o && (s.commands[o] || M.FE.COMMANDS[o] && M.FE.COMMANDS[o].callback)) return e.preventDefault(), e.stopPropagation(), "keydown" == e.type && ((s.commands[o] || M.FE.COMMANDS[o].callback)(), l = !0), !1
                    }
                }
            }
            return {
                _init: function() {
                    s.events.on("keydown", e, !0), s.events.on("keyup", e, !0)
                },
                get: function(e) {
                    if (!s.opts.shortcutsHint) return null;
                    if (!r) for (var t in r = {}, M.FE.SHORTCUTS_MAP) M.FE.SHORTCUTS_MAP.hasOwnProperty(t) && 0 <= s.opts.shortcutsEnabled.indexOf(M.FE.SHORTCUTS_MAP[t].cmd) && (r[M.FE.SHORTCUTS_MAP[t].cmd + "." + (M.FE.SHORTCUTS_MAP[t].val || "")] = {
                        shift: M.FE.SHORTCUTS_MAP[t].shift,
                        option: M.FE.SHORTCUTS_MAP[t].option,
                        letter: M.FE.SHORTCUTS_MAP[t].letter
                    });
                    var n = r[e];
                    return n ? (s.helpers.isMac() ? String.fromCharCode(8984) : "Ctrl+") + (n.shift ? s.helpers.isMac() ? String.fromCharCode(8679) : "Shift+" : "") + (n.option ? s.helpers.isMac() ? String.fromCharCode(8997) : "Alt+" : "") + n.letter : null
                }
            }
        }, M.FE.MODULES.snapshot = function(l) {
            function n(e) {
                for (var t = e.parentNode.childNodes, n = 0, r = null, o = 0; o < t.length; o++) {
                    if (r) {
                        var i = t[o].nodeType === Node.TEXT_NODE && "" === t[o].textContent,
                            a = r.nodeType === Node.TEXT_NODE && t[o].nodeType === Node.TEXT_NODE;
                        i || a || n++
                    }
                    if (t[o] == e) return n;
                    r = t[o]
                }
            }
            function o(e) {
                var t = [];
                if (!e.parentNode) return [];
                for (; !l.node.isElement(e);) t.push(n(e)), e = e.parentNode;
                return t.reverse()
            }
            function i(e, t) {
                for (; e && e.nodeType === Node.TEXT_NODE;) {
                    var n = e.previousSibling;
                    n && n.nodeType == Node.TEXT_NODE && (t += n.textContent.length), e = n
                }
                return t
            }
            function d(e) {
                for (var t = l.el, n = 0; n < e.length; n++) t = t.childNodes[e[n]];
                return t
            }
            function r(e, t) {
                try {
                    var n = d(t.scLoc),
                        r = t.scOffset,
                        o = d(t.ecLoc),
                        i = t.ecOffset,
                        a = l.doc.createRange();
                    a.setStart(n, r), a.setEnd(o, i), e.addRange(a)
                } catch (s) {
                    console.warn(s)
                }
            }
            return {
                get: function() {
                    var e, t = {};
                    if (l.events.trigger("snapshot.before"), t.html = (l.$wp ? l.$el.html() : l.$oel.get(0).outerHTML).replace(/ style=""/g, ""), t.ranges = [], l.$wp && l.selection.inEditor() && l.core.hasFocus()) for (var n = l.selection.ranges(), r = 0; r < n.length; r++) t.ranges.push({
                        scLoc: o((e = n[r]).startContainer),
                        scOffset: i(e.startContainer, e.startOffset),
                        ecLoc: o(e.endContainer),
                        ecOffset: i(e.endContainer, e.endOffset)
                    });
                    return l.events.trigger("snapshot.after", [t]), t
                },
                restore: function(e) {
                    l.$el.html() != e.html && (l.opts.htmlExecuteScripts ? l.$el.html(e.html) : l.el.innerHTML = e.html);
                    var t = l.selection.get();
                    l.selection.clear(), l.events.focus(!0);
                    for (var n = 0; n < e.ranges.length; n++) r(t, e.ranges[n])
                },
                equal: function(e, t) {
                    return e.html == t.html && (!l.core.hasFocus() || JSON.stringify(e.ranges) == JSON.stringify(t.ranges))
                }
            }
        }, M.FE.MODULES.undo = function(n) {
            function e(e) {
                var t = e.which;
                n.keys.ctrlKey(e) && (90 == t && e.shiftKey && e.preventDefault(), 90 == t && e.preventDefault())
            }
            var t = null;

            function r() {
                if (!n.undo_stack || n.undoing) return !1;
                for (; n.undo_stack.length > n.undo_index;) n.undo_stack.pop()
            }
            function o() {
                n.undo_index = 0, n.undo_stack = []
            }
            function i() {
                n.undo_stack = []
            }
            return {
                _init: function() {
                    o(), n.events.on("initialized", function() {
                        t = (n.$wp ? n.$el.html() : n.$oel.get(0).outerHTML).replace(/ style=""/g, "")
                    }), n.events.on("blur", function() {
                        n.el.querySelector(".fr-dragging") || n.undo.saveStep()
                    }), n.events.on("keydown", e), n.events.on("destroy", i)
                },
                run: function() {
                    if (1 < n.undo_index) {
                        n.undoing = !0;
                        var e = n.undo_stack[--n.undo_index - 1];
                        clearTimeout(n._content_changed_timer), n.snapshot.restore(e), t = e.html, n.popups.hideAll(), n.toolbar.enable(), n.events.trigger("contentChanged"), n.events.trigger("commands.undo"), n.undoing = !1
                    }
                },
                redo: function() {
                    if (n.undo_index < n.undo_stack.length) {
                        n.undoing = !0;
                        var e = n.undo_stack[n.undo_index++];
                        clearTimeout(n._content_changed_timer), n.snapshot.restore(e), t = e.html, n.popups.hideAll(), n.toolbar.enable(), n.events.trigger("contentChanged"), n.events.trigger("commands.redo"), n.undoing = !1
                    }
                },
                canDo: function() {
                    return !(0 === n.undo_stack.length || n.undo_index <= 1)
                },
                canRedo: function() {
                    return n.undo_index != n.undo_stack.length
                },
                dropRedo: r,
                reset: o,
                saveStep: function(e) {
                    if (!n.undo_stack || n.undoing || n.el.querySelector(".fr-marker")) return !1;
                    void 0 === e ? (e = n.snapshot.get(), n.undo_stack[n.undo_index - 1] && n.snapshot.equal(n.undo_stack[n.undo_index - 1], e) || (r(), n.undo_stack.push(e), n.undo_index++, e.html != t && (n.events.trigger("contentChanged"), t = e.html))) : (r(), 0 < n.undo_index ? n.undo_stack[n.undo_index - 1] = e : (n.undo_stack.push(e), n.undo_index++))
                }
            }
        }, M.FE.ICON_TEMPLATES = {
            font_awesome: '<i class="fa fa-[NAME]" aria-hidden="true"></i>',
            font_awesome_5: '<i class="fas fa-[FA5NAME]" aria-hidden="true"></i>',
            font_awesome_5r: '<i class="far fa-[FA5NAME]" aria-hidden="true"></i>',
            font_awesome_5l: '<i class="fal fa-[FA5NAME]" aria-hidden="true"></i>',
            text: '<span style="text-align: center;">[NAME]</span>',
            image: "<img src=[SRC] alt=[ALT] />",
            svg: '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">[PATH]</svg>'
        }, M.FE.ICONS = {
            bold: {
                NAME: "bold"
            },
            italic: {
                NAME: "italic"
            },
            underline: {
                NAME: "underline"
            },
            strikeThrough: {
                NAME: "strikethrough"
            },
            subscript: {
                NAME: "subscript"
            },
            superscript: {
                NAME: "superscript"
            },
            color: {
                NAME: "tint"
            },
            outdent: {
                NAME: "outdent"
            },
            indent: {
                NAME: "indent"
            },
            undo: {
                NAME: "rotate-left",
                FA5NAME: "undo"
            },
            redo: {
                NAME: "rotate-right",
                FA5NAME: "redo"
            },
            insertHR: {
                NAME: "minus"
            },
            clearFormatting: {
                NAME: "eraser"
            },
            selectAll: {
                NAME: "mouse-pointer"
            }
        }, M.FE.DefineIconTemplate = function(e, t) {
            M.FE.ICON_TEMPLATES[e] = t
        }, M.FE.DefineIcon = function(e, t) {
            M.FE.ICONS[e] = t
        }, M.extend(M.FE.DEFAULTS, {
            iconsTemplate: "font_awesome"
        }), M.FE.MODULES.icon = function(o) {
            return {
                create: function(n) {
                    var e = null,
                        r = M.FE.ICONS[n];
                    if (void 0 !== r) {
                        var t = r.template || M.FE.ICON_DEFAULT_TEMPLATE || o.opts.iconsTemplate;
                        r.FA5NAME || (r.FA5NAME = r.NAME), t && (t = M.FE.ICON_TEMPLATES[t]) && (e = t.replace(/\[([a-zA-Z0-9]*)\]/g, function(e, t) {
                            return "NAME" == t ? r[t] || n : r[t]
                        }))
                    }
                    return e || n
                },
                getTemplate: function(e) {
                    var t = M.FE.ICONS[e],
                        n = o.opts.iconsTemplate;
                    return void 0 !== t ? n = t.template || M.FE.ICON_DEFAULT_TEMPLATE || o.opts.iconsTemplate : n
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            tooltips: !0
        }), M.FE.MODULES.tooltip = function(o) {
            function r() {
                if (o.helpers.isMobile()) return !1;
                o.$tooltip && o.$tooltip.removeClass("fr-visible").css("left", "-3000px").css("position", "fixed")
            }
            function i(e, t) {
                if (o.helpers.isMobile()) return !1;
                if (e.data("title") || e.data("title", e.attr("title")), !e.data("title")) return !1;
                o.$tooltip || o.opts.tooltips && !o.helpers.isMobile() && (o.shared.$tooltip ? o.$tooltip = o.shared.$tooltip : (o.shared.$tooltip = M('<div class="fr-tooltip"></div>'), o.$tooltip = o.shared.$tooltip, o.opts.theme && o.$tooltip.addClass(o.opts.theme + "-theme"), M(o.o_doc).find("body:first").append(o.$tooltip)), o.events.on("shared.destroy", function() {
                    o.$tooltip.html("").removeData().remove(), o.$tooltip = null
                }, !0)), e.removeAttr("title"), o.$tooltip.text(o.language.translate(e.data("title"))), o.$tooltip.addClass("fr-visible");
                var n = e.offset().left + (e.outerWidth() - o.$tooltip.outerWidth()) / 2;
                n < 0 && (n = 0), n + o.$tooltip.outerWidth() > M(o.o_win).width() && (n = M(o.o_win).width() - o.$tooltip.outerWidth()), void 0 === t && (t = o.opts.toolbarBottom);
                var r = t ? e.offset().top - o.$tooltip.height() : e.offset().top + e.outerHeight();
                o.$tooltip.css("position", ""), o.$tooltip.css("left", n), o.$tooltip.css("top", Math.ceil(r)), "static" != M(o.o_doc).find("body:first").css("position") ? (o.$tooltip.css("margin-left", -M(o.o_doc).find("body:first").offset().left), o.$tooltip.css("margin-top", -M(o.o_doc).find("body:first").offset().top)) : (o.$tooltip.css("margin-left", ""), o.$tooltip.css("margin-top", ""))
            }
            return {
                hide: r,
                to: i,
                bind: function(e, t, n) {
                    o.opts.tooltips && !o.helpers.isMobile() && (o.events.$on(e, "mouseenter", t, function(e) {
                        o.node.hasClass(e.currentTarget, "fr-disabled") || o.edit.isDisabled() || i(M(e.currentTarget), n)
                    }, !0), o.events.$on(e, "mouseleave " + o._mousedown + " " + o._mouseup, t, function() {
                        r()
                    }, !0))
                }
            }
        }, M.FE.MODULES.button = function(u) {
            var a = [];
            (u.opts.toolbarInline || u.opts.toolbarContainer) && (u.shared.buttons || (u.shared.buttons = []), a = u.shared.buttons);
            var s = [];

            function l(e, t, n) {
                for (var r = M(), o = 0; o < e.length; o++) {
                    var i = M(e[o]);
                    if (i.is(t) && (r = r.add(i)), n && i.is(".fr-dropdown")) {
                        var a = i.next().find(t);
                        r = r.add(a)
                    }
                }
                return r
            }
            function d(e, t) {
                var n, r = M();
                if (!e) return r;
                for (n in r = (r = r.add(l(a, e, t))).add(l(s, e, t)), u.shared.popups) if (u.shared.popups.hasOwnProperty(n)) {
                    var o = u.shared.popups[n].children().find(e);
                    r = r.add(o)
                }
                for (n in u.shared.modals) if (u.shared.modals.hasOwnProperty(n)) {
                    var i = u.shared.modals[n].$modal.find(e);
                    r = r.add(i)
                }
                return r
            }
            function r(e) {
                e.addClass("fr-blink"), setTimeout(function() {
                    e.removeClass("fr-blink")
                }, 500);
                for (var t = e.data("cmd"), n = []; void 0 !== e.data("param" + (n.length + 1));) n.push(e.data("param" + (n.length + 1)));
                var r = d(".fr-dropdown.fr-active");
                r.length && (r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0), r.parent(".fr-toolbar:not(.fr-inline)").css("zIndex", "")), e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t, n)
            }
            function t(e) {
                var t = e.parents(".fr-popup, .fr-toolbar").data("instance");
                if (0 !== e.parents(".fr-popup").length || e.data("popup") || t.popups.hideAll(), t.popups.areVisible() && !t.popups.areVisible(t)) {
                    for (var n = 0; n < M.FE.INSTANCES.length; n++) M.FE.INSTANCES[n] != t && M.FE.INSTANCES[n].popups && M.FE.INSTANCES[n].popups.areVisible() && M.FE.INSTANCES[n].$el.find(".fr-marker").remove();
                    t.popups.hideAll()
                }
                u.node.hasClass(e.get(0), "fr-dropdown") ?
                    function(e) {
                        var t = e.next(),
                            n = u.node.hasClass(e.get(0), "fr-active"),
                            r = d(".fr-dropdown.fr-active").not(e),
                            o = e.parents(".fr-toolbar, .fr-popup").data("instance") || u;
                        if (o.helpers.isIOS() && !o.el.querySelector(".fr-marker") && (o.selection.save(), o.selection.clear(), o.selection.restore()), !n) {
                            var i = e.data("cmd");
                            t.find(".fr-command").removeClass("fr-active").attr("aria-selected", !1), M.FE.COMMANDS[i] && M.FE.COMMANDS[i].refreshOnShow && M.FE.COMMANDS[i].refreshOnShow.apply(o, [e, t]), t.css("left", e.offset().left - e.parent().offset().left - ("rtl" == u.opts.direction ? t.width() - e.outerWidth() : 0)), t.addClass("test-height");
                            var a = t.outerHeight();
                            t.removeClass("test-height"), t.css("top", "").css("bottom", ""), !u.opts.toolbarBottom && t.offset().top + e.outerHeight() + a < M(u.o_doc).height() ? t.css("top", e.position().top + e.outerHeight()) : t.css("bottom", e.parents(".fr-popup, .fr-toolbar").first().height() - e.position().top)
                        }
                        e.addClass("fr-blink").toggleClass("fr-active"), e.hasClass("fr-active") ? (t.attr("aria-hidden", !1), e.attr("aria-expanded", !0)) : (t.attr("aria-hidden", !0), e.attr("aria-expanded", !1)), setTimeout(function() {
                            e.removeClass("fr-blink")
                        }, 300), t.css("margin-left", ""), t.offset().left + t.outerWidth() > u.$sc.offset().left + u.$sc.width() && t.css("margin-left", -(t.offset().left + t.outerWidth() - u.$sc.offset().left - u.$sc.width())), t.offset().left < u.$sc.offset().left && "rtl" == u.opts.direction && t.css("margin-left", u.$sc.offset().left), r.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0), r.parent(".fr-toolbar:not(.fr-inline)").css("zIndex", ""), 0 !== e.parents(".fr-popup").length || u.opts.toolbarInline || (u.node.hasClass(e.get(0), "fr-active") ? u.$tb.css("zIndex", (u.opts.zIndex || 1) + 4) : u.$tb.css("zIndex", ""));
                        var s = t.find("a.fr-command.fr-active:first");
                        u.helpers.isMobile() || (s.length ? u.accessibility.focusToolbarElement(s) : u.accessibility.focusToolbarElement(e))
                    }(e) : (r(e), M.FE.COMMANDS[e.data("cmd")] && !1 !== M.FE.COMMANDS[e.data("cmd")].refreshAfterCallback && t.button.bulkRefresh())
            }
            function i(e) {
                t(M(e.currentTarget))
            }
            function c(e) {
                var t = e.find(".fr-dropdown.fr-active");
                t.length && (t.removeClass("fr-active").attr("aria-expanded", !1).next().attr("aria-hidden", !0), t.parent(".fr-toolbar:not(.fr-inline)").css("zIndex", ""))
            }
            function f(e) {
                e.preventDefault(), e.stopPropagation()
            }
            function p(e) {
                if (e.stopPropagation(), !u.helpers.isMobile()) return !1
            }
            function g(e, t, n) {
                if (u.helpers.isMobile() && !1 === t.showOnMobile) return "";
                var r, o = t.displaySelection;
                if ("function" == typeof o && (o = o(u)), o) {
                    var i = "function" == typeof t.defaultSelection ? t.defaultSelection(u) : t.defaultSelection;
                    r = '<span style="width:' + (t.displaySelectionWidth || 100) + 'px">' + u.language.translate(i || t.title) + "</span>"
                } else r = u.icon.create(t.icon || e), r += '<span class="fr-sr-only">' + (u.language.translate(t.title) || "") + "</span>";
                var a = t.popup ? ' data-popup="true"' : "",
                    s = t.modal ? ' data-modal="true"' : "",
                    l = u.shortcuts.get(e + ".");
                l = l ? " (" + l + ")" : "";
                var d = e + "-" + u.id,
                    c = "dropdown-menu-" + d,
                    f = '<button id="' + d + '"type="button" tabIndex="-1" role="button"' + (t.toggle ? ' aria-pressed="false"' : "") + ("dropdown" == t.type ? ' aria-controls="' + c + '" aria-expanded="false" aria-haspopup="true"' : "") + (t.disabled ? ' aria-disabled="true"' : "") + ' title="' + (u.language.translate(t.title) || "") + l + '" class="fr-command fr-btn' + ("dropdown" == t.type ? " fr-dropdown" : "") + " fr-btn-" + u.icon.getTemplate(t.icon) + (t.displaySelection ? " fr-selection" : "") + (t.back ? " fr-back" : "") + (t.disabled ? " fr-disabled" : "") + (n ? "" : " fr-hidden") + '" data-cmd="' + e + '"' + a + s + ">" + r + "</button>";
                if ("dropdown" == t.type) {
                    var p = '<div id="' + c + '" class="fr-dropdown-menu" role="listbox" aria-labelledby="' + d + '" aria-hidden="true"><div class="fr-dropdown-wrapper" role="presentation"><div class="fr-dropdown-content" role="presentation">';
                    p +=
                        function(e, t) {
                            var n = "";
                            if (t.html)"function" == typeof t.html ? n += t.html.call(u) : n += t.html;
                            else {
                                var r = t.options;
                                for (var o in "function" == typeof r && (r = r()), n += '<ul class="fr-dropdown-list" role="presentation">', r) if (r.hasOwnProperty(o)) {
                                    var i = u.shortcuts.get(e + "." + o);
                                    i = i ? '<span class="fr-shortcut">' + i + "</span>" : "", n += '<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="' + e + '" data-param1="' + o + '" title="' + r[o] + '">' + u.language.translate(r[o]) + "</a></li>"
                                }
                                n += "</ul>"
                            }
                            return n
                        }(e, t), f += p += "</div></div></div>"
                }
                return f
            }
            function e(o) {
                var i = u.$tb && u.$tb.data("instance") || u;
                if (!1 === u.events.trigger("buttons.refresh")) return !0;
                setTimeout(function() {
                    for (var e = i.selection.inEditor() && i.core.hasFocus(), t = 0; t < o.length; t++) {
                        var n = M(o[t]),
                            r = n.data("cmd");
                        0 === n.parents(".fr-popup").length ? e || M.FE.COMMANDS[r] && M.FE.COMMANDS[r].forcedRefresh ? i.button.refresh(n) : u.node.hasClass(n.get(0), "fr-dropdown") || (n.removeClass("fr-active"), n.attr("aria-pressed") && n.attr("aria-pressed", !1)) : n.parents(".fr-popup").is(":visible") && i.button.refresh(n)
                    }
                }, 0)
            }
            function n() {
                e(a), e(s)
            }
            function o() {
                a = [], s = []
            }
            u.shared.popup_buttons || (u.shared.popup_buttons = []), s = u.shared.popup_buttons;
            var h = null;

            function m() {
                clearTimeout(h), h = setTimeout(n, 50)
            }
            return {
                _init: function() {
                    u.opts.toolbarInline ? u.events.on("toolbar.show", n) : (u.events.on("mouseup", m), u.events.on("keyup", m), u.events.on("blur", m), u.events.on("focus", m), u.events.on("contentChanged", m), u.helpers.isMobile() && u.events.$on(u.$doc, "selectionchange", n)), u.events.on("shared.destroy", o)
                },
                buildList: function(e, t) {
                    for (var n = "", r = 0; r < e.length; r++) {
                        var o = e[r],
                            i = M.FE.COMMANDS[o];
                        i && "undefined" != typeof i.plugin && u.opts.pluginsEnabled.indexOf(i.plugin) < 0 || (i ? n += g(o, i, void 0 === t || 0 <= t.indexOf(o)) : "|" == o ? n += '<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>' : "-" == o && (n += '<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>'))
                    }
                    return n
                },
                bindCommands: function(t, e) {
                    u.events.bindClick(t, ".fr-command:not(.fr-disabled)", i), u.events.$on(t, u._mousedown + " " + u._mouseup + " " + u._move, ".fr-dropdown-menu", f, !0), u.events.$on(t, u._mousedown + " " + u._mouseup + " " + u._move, ".fr-dropdown-menu .fr-dropdown-wrapper", p, !0);
                    var n = t.get(0).ownerDocument,
                        r = "defaultView" in n ? n.defaultView : n.parentWindow,
                        o = function(e) {
                            (!e || e.type == u._mouseup && e.target != M("html").get(0) || "keydown" == e.type && (u.keys.isCharacter(e.which) && !u.keys.ctrlKey(e) || e.which == M.FE.KEYCODE.ESC)) && c(t)
                        };
                    u.events.$on(M(r), u._mouseup + " resize keydown", o, !0), u.opts.iframe && u.events.$on(u.$win, u._mouseup, o, !0), u.node.hasClass(t.get(0), "fr-popup") ? M.merge(s, t.find(".fr-btn").toArray()) : M.merge(a, t.find(".fr-btn").toArray()), u.tooltip.bind(t, ".fr-btn, .fr-title", e)
                },
                refresh: function(e) {
                    var t, n = e.parents(".fr-popup, .fr-toolbar").data("instance") || u,
                        r = e.data("cmd");
                    u.node.hasClass(e.get(0), "fr-dropdown") ? t = e.next() : (e.removeClass("fr-active"), e.attr("aria-pressed") && e.attr("aria-pressed", !1)), M.FE.COMMANDS[r] && M.FE.COMMANDS[r].refresh ? M.FE.COMMANDS[r].refresh.apply(n, [e, t]) : u.refresh[r] && n.refresh[r](e, t)
                },
                bulkRefresh: n,
                exec: r,
                click: t,
                hideActiveDropdowns: c,
                getButtons: d
            }
        }, M.FE.MODULES.modals = function(l) {
            l.shared.modals || (l.shared.modals = {});
            var s, d = l.shared.modals;

            function e() {
                for (var e in d) {
                    var t = d[e];
                    t && t.$modal && t.$modal.removeData().remove()
                }
                s && s.removeData().remove(), d = {}
            }
            function c(e, t) {
                if (d[e]) {
                    var n = d[e].$modal,
                        r = n.data("instance") || l;
                    r.events.enableBlur(), n.hide(), s.hide(), M(r.o_doc).find("body:first").removeClass("prevent-scroll fr-mobile"), n.removeClass("fr-active"), t || (r.accessibility.restoreSelection(), r.events.trigger("modals.hide"))
                }
            }
            function n(e) {
                var t;
                if ("string" == typeof e) {
                    if (!d[e]) return;
                    t = d[e].$modal
                } else t = e;
                return t && l.node.hasClass(t, "fr-active") && l.core.sameInstance(t) || !1
            }
            return {
                _init: function() {
                    l.events.on("shared.destroy", e, !0)
                },
                get: function(e) {
                    return d[e]
                },
                create: function(n, e, t) {
                    if (l.shared.$overlay || (l.shared.$overlay = M('<div class="fr-overlay">').appendTo("body:first")), s = l.shared.$overlay, l.opts.theme && s.addClass(l.opts.theme + "-theme"), !d[n]) {
                        var r = (o = e, i = t, a = '<div tabIndex="-1" class="fr-modal' + (l.opts.theme ? " " + l.opts.theme + "-theme" : "") + '"><div class="fr-modal-wrapper">', a += '<div class="fr-modal-head">' + o + '<i title="' + l.language.translate("Cancel") + '" class="fa fa-times fr-modal-close"></i></div>', a += '<div tabIndex="-1" class="fr-modal-body">' + i + "</div>", M(a += "</div></div>"));
                        d[n] = {
                            $modal: r,
                            $head: r.find(".fr-modal-head"),
                            $body: r.find(".fr-modal-body")
                        }, l.helpers.isMobile() || r.addClass("fr-desktop"), r.appendTo("body:first"), l.events.$on(r, "click", ".fr-modal-close", function() {
                            c(n)
                        }, !0), d[n].$body.css("margin-top", d[n].$head.outerHeight()), l.events.$on(r, "keydown", function(e) {
                            var t = e.which;
                            return t == M.FE.KEYCODE.ESC ? (c(n), l.accessibility.focusModalButton(r), !1) : !(!M(e.currentTarget).is("input[type=text], textarea") && t != M.FE.KEYCODE.ARROW_UP && t != M.FE.KEYCODE.ARROW_DOWN && !l.keys.isBrowserAction(e) && (e.preventDefault(), e.stopPropagation(), 1))
                        }, !0), c(n, !0)
                    }
                    var o, i, a;
                    return d[n]
                },
                show: function(e) {
                    if (d[e]) {
                        var t = d[e].$modal;
                        t.data("instance", l), t.show(), s.show(), M(l.o_doc).find("body:first").addClass("prevent-scroll"), l.helpers.isMobile() && M(l.o_doc).find("body:first").addClass("fr-mobile"), t.addClass("fr-active"), l.accessibility.focusModal(t)
                    }
                },
                hide: c,
                resize: function(e) {
                    if (d[e]) {
                        var t = d[e],
                            n = t.$modal,
                            r = t.$body,
                            o = M(l.o_win).height(),
                            i = n.find(".fr-modal-wrapper"),
                            a = o - i.outerHeight(!0) + (i.height() - (r.outerHeight(!0) - r.height())),
                            s = "auto";
                        a < r.get(0).scrollHeight && (s = a), r.height(s)
                    }
                },
                isVisible: n,
                areVisible: function(e) {
                    for (var t in d) if (d.hasOwnProperty(t) && n(t) && (void 0 === e || d[t].$modal.data("instance") == e)) return d[t].$modal;
                    return !1
                }
            }
        }, M.FE.POPUP_TEMPLATES = {
            "text.edit": "[_EDIT_]"
        }, M.FE.RegisterTemplate = function(e, t) {
            M.FE.POPUP_TEMPLATES[e] = t
        }, M.FE.MODULES.popups = function(c) {
            c.shared.popups || (c.shared.popups = {});
            var f = c.shared.popups;

            function p(e, t) {
                t.is(":visible") || (t = c.$sc), t.is(f[e].data("container")) || (f[e].data("container", t), t.append(f[e]))
            }
            function u(e) {
                return f[e] && c.node.hasClass(f[e], "fr-active") && c.core.sameInstance(f[e]) || !1
            }
            function g(e) {
                for (var t in f) if (f.hasOwnProperty(t) && u(t) && (void 0 === e || f[t].data("instance") == e)) return f[t];
                return !1
            }
            function n(e) {
                var t = null;
                (t = "string" != typeof e ? e : f[e]) && c.node.hasClass(t, "fr-active") && (t.removeClass("fr-active fr-above"), c.events.trigger("popups.hide." + e), c.$tb && (1 < c.opts.zIndex ? c.$tb.css("zIndex", c.opts.zIndex + 1) : c.$tb.css("zIndex", "")), c.events.disableBlur(), t.find("input, textarea, button").filter(":focus").blur(), t.find("input, textarea").attr("disabled", "disabled"))
            }
            function h(e) {
                for (var t in void 0 === e && (e = []), f) f.hasOwnProperty(t) && e.indexOf(t) < 0 && n(t)
            }
            function t() {
                c.shared.exit_flag = !0
            }
            function m() {
                c.shared.exit_flag = !1
            }
            function i() {
                return c.shared.exit_flag
            }
            function o(e, t) {
                var n, r, o = function(e, t) {
                    var n = M.FE.POPUP_TEMPLATES[e];
                    if (!n) return null;
                    for (var r in "function" == typeof n && (n = n.apply(c)), t) t.hasOwnProperty(r) && (n = n.replace("[_" + r.toUpperCase() + "_]", t[r]));
                    return n
                }(e, t);
                return o ? (n = M('<div class="fr-popup' + (c.helpers.isMobile() ? " fr-mobile" : " fr-desktop") + (c.opts.toolbarInline ? " fr-inline" : "") + '"><span class="fr-arrow"></span>' + o + "</div>"), c.opts.theme && n.addClass(c.opts.theme + "-theme"), 1 < c.opts.zIndex && (c.opts.editInPopup ? n.css("z-index", c.opts.zIndex + 2) : c.$tb.css("z-index", c.opts.zIndex + 2)), "auto" != c.opts.direction && n.removeClass("fr-ltr fr-rtl").addClass("fr-" + c.opts.direction), n.find("input, textarea").attr("dir", c.opts.direction).attr("disabled", "disabled"), (r = M("body:first")).append(n), n.data("container", r), f[e] = n, c.button.bindCommands(n, !1), n) : (n = M('<div class="fr-popup fr-empty"></div>'), (r = M("body:first")).append(n), n.data("container", r), f[e] = n)
            }
            function E(r) {
                var o = f[r];
                return {
                    _windowResize: function() {
                        var e = o.data("instance") || c;
                        !e.helpers.isMobile() && o.is(":visible") && (e.events.disableBlur(), e.popups.hide(r), e.events.enableBlur())
                    },
                    _inputFocus: function(e) {
                        var t = o.data("instance") || c,
                            n = M(e.currentTarget);
                        if (n.is("input:file") && n.closest(".fr-layer").addClass("fr-input-focus"), e.preventDefault(), e.stopPropagation(), setTimeout(function() {
                                t.events.enableBlur()
                            }, 100), t.helpers.isMobile()) {
                            var r = M(t.o_win).scrollTop();
                            setTimeout(function() {
                                M(t.o_win).scrollTop(r)
                            }, 0)
                        }
                    },
                    _inputBlur: function(e) {
                        var t = o.data("instance") || c,
                            n = M(e.currentTarget);
                        n.is("input:file") && n.closest(".fr-layer").removeClass("fr-input-focus"), document.activeElement != this && M(this).is(":visible") && (t.events.blurActive() && t.events.trigger("blur"), t.events.enableBlur())
                    },
                    _editorKeydown: function(e) {
                        var t = o.data("instance") || c;
                        t.keys.ctrlKey(e) || e.which == M.FE.KEYCODE.ALT || e.which == M.FE.KEYCODE.ESC || (u(r) && o.find(".fr-back:visible").length ? t.button.exec(o.find(".fr-back:visible:first")) : e.which != M.FE.KEYCODE.ALT && t.popups.hide(r))
                    },
                    _preventFocus: function(e) {
                        var t = o.data("instance") || c,
                            n = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null;
                        "mouseup" == e.type || M(n).is(":focus") || t.events.disableBlur(), "mouseup" != e.type || M(n).hasClass("fr-command") || 0 < M(n).parents(".fr-command").length || M(n).hasClass("fr-dropdown-content") || c.button.hideActiveDropdowns(o), (c.browser.safari || c.browser.mozilla) && "mousedown" == e.type && M(n).is("input[type=file]") && t.events.disableBlur();
                        var r = "input, textarea, button, select, label, .fr-command";
                        if (n && !M(n).is(r) && 0 === M(n).parents(r).length) return e.stopPropagation(), !1;
                        n && M(n).is(r) && e.stopPropagation(), m()
                    },
                    _editorMouseup: function() {
                        o.is(":visible") && i() && 0 < o.find("input:focus, textarea:focus, button:focus, select:focus").filter(":visible").length && c.events.disableBlur()
                    },
                    _windowMouseup: function(e) {
                        if (!c.core.sameInstance(o)) return !0;
                        var t = o.data("instance") || c;
                        o.is(":visible") && i() && (e.stopPropagation(), t.markers.remove(), t.popups.hide(r), m())
                    },
                    _windowKeydown: function(e) {
                        if (!c.core.sameInstance(o)) return !0;
                        var t = o.data("instance") || c,
                            n = e.which;
                        if (M.FE.KEYCODE.ESC == n) {
                            if (t.popups.isVisible(r) && t.opts.toolbarInline) return e.stopPropagation(), t.popups.isVisible(r) && (o.find(".fr-back:visible").length ? (t.button.exec(o.find(".fr-back:visible:first")), t.accessibility.focusPopupButton(o)) : o.find(".fr-dismiss:visible").length ? t.button.exec(o.find(".fr-dismiss:visible:first")) : (t.popups.hide(r), t.toolbar.showInline(null, !0), t.accessibility.FocusPopupButton(o))), !1;
                            if (t.popups.isVisible(r)) return o.find(".fr-back:visible").length ? (t.button.exec(o.find(".fr-back:visible:first")), t.accessibility.focusPopupButton(o)) : o.find(".fr-dismiss:visible").length ? t.button.exec(o.find(".fr-dismiss:visible:first")) : (t.popups.hide(r), t.accessibility.focusPopupButton(o)), !1
                        }
                    },
                    _doPlaceholder: function() {
                        0 === M(this).next().length && M(this).attr("placeholder") && M(this).after('<label for="' + M(this).attr("id") + '">' + M(this).attr("placeholder") + "</label>"), M(this).toggleClass("fr-not-empty", "" !== M(this).val())
                    },
                    _repositionPopup: function() {
                        if (!c.opts.height && !c.opts.heightMax || c.opts.toolbarInline) return !0;
                        if (c.$wp && u(r) && o.parent().get(0) == c.$sc.get(0)) {
                            var e = o.offset().top - c.$wp.offset().top,
                                t = c.$wp.outerHeight();
                            c.node.hasClass(o.get(0), "fr-above") && (e += o.outerHeight()), t < e || e < 0 ? o.addClass("fr-hidden") : o.removeClass("fr-hidden")
                        }
                    }
                }
            }
            function a(e, t) {
                c.events.on("mouseup", e._editorMouseup, !0), c.$wp && c.events.on("keydown", e._editorKeydown), c.events.on("blur", function() {
                    g() && c.markers.remove(), h()
                }), c.$wp && !c.helpers.isMobile() && c.events.$on(c.$wp, "scroll.popup" + t, e._repositionPopup), c.events.on("window.mouseup", e._windowMouseup, !0), c.events.on("window.keydown", e._windowKeydown, !0), f[t].data("inst" + c.id, !0), c.events.on("destroy", function() {
                    c.core.sameInstance(f[t]) && f[t].removeClass("fr-active").appendTo("body:first")
                }, !0)
            }
            function e() {
                for (var e in f) if (f.hasOwnProperty(e)) {
                    var t = f[e];
                    t && (t.html("").removeData().remove(), f[e] = null)
                }
                f = []
            }
            return c.shared.exit_flag = !1, {
                _init: function() {
                    c.events.on("shared.destroy", e, !0), c.events.on("window.mousedown", t), c.events.on("window.touchmove", m), c.events.$on(M(c.o_win), "scroll", m), c.events.on("mousedown", function(e) {
                        g() && (e.stopPropagation(), c.$el.find(".fr-marker").remove(), t(), c.events.disableBlur())
                    })
                },
                create: function(e, t) {
                    var n = o(e, t),
                        r = E(e);
                    return a(r, e), c.events.$on(n, "mousedown mouseup touchstart touchend touch", "*", r._preventFocus, !0), c.events.$on(n, "focus", "input, textarea, button, select", r._inputFocus, !0), c.events.$on(n, "blur", "input, textarea, button, select", r._inputBlur, !0), c.accessibility.registerPopup(e), c.events.$on(n, "keydown keyup change input", "input, textarea", r._doPlaceholder, !0), c.helpers.isIOS() && c.events.$on(n, "touchend", "label", function() {
                        M("#" + M(this).attr("for")).prop("checked", function(e, t) {
                            return !t
                        })
                    }, !0), c.events.$on(M(c.o_win), "resize", r._windowResize, !0), n
                },
                get: function(e) {
                    var t = f[e];
                    return t && !t.data("inst" + c.id) && a(E(e), e), t
                },
                show: function(e, t, n, r) {
                    if (u(e) || (g() && 0 < c.$el.find(".fr-marker").length ? (c.events.disableBlur(), c.selection.restore()) : g() || (c.events.disableBlur(), c.events.focus(), c.events.enableBlur())), h([e]), !f[e]) return !1;
                    var o = c.button.getButtons(".fr-dropdown.fr-active");
                    o.removeClass("fr-active").attr("aria-expanded", !1).parent(".fr-toolbar").css("zIndex", ""), o.next().attr("aria-hidden", !0), f[e].data("instance", c), c.$tb && c.$tb.data("instance", c);
                    var i = f[e].outerWidth(),
                        a = u(e);
                    f[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");
                    var s, l, d = f[e].data("container");
                    s = e, (l = d).is(":visible") || (l = c.$sc), 0 === l.find([f[s]]).length && l.append(f[s]), c.opts.toolbarInline && d && c.$tb && d.get(0) == c.$tb.get(0) && (p(e, c.$sc), n = c.$tb.offset().top - c.helpers.getPX(c.$tb.css("margin-top")), t = c.$tb.offset().left + c.$tb.outerWidth() / 2 + (parseFloat(c.$tb.find(".fr-arrow").css("margin-left")) || 0) + c.$tb.find(".fr-arrow").outerWidth() / 2, c.node.hasClass(c.$tb.get(0), "fr-above") && n && (n += c.$tb.outerHeight()), r = 0), d = f[e].data("container"), !c.opts.iframe || r || a || (t && (t -= c.$iframe.offset().left), n && (n -= c.$iframe.offset().top)), d.is(c.$tb) ? c.$tb.css("zIndex", (c.opts.zIndex || 1) + 4) : f[e].css("zIndex", (c.opts.zIndex || 1) + 4), t && (t -= i / 2), c.opts.toolbarBottom && d && c.$tb && d.get(0) == c.$tb.get(0) && (f[e].addClass("fr-above"), n && (n -= f[e].outerHeight())), f[e].removeClass("fr-active"), c.position.at(t, n, f[e], r || 0), f[e].addClass("fr-active"), a || c.accessibility.focusPopup(f[e]), c.opts.toolbarInline && c.toolbar.hide(), c.events.trigger("popups.show." + e), E(e)._repositionPopup(), m()
                },
                hide: n,
                onHide: function(e, t) {
                    c.events.on("popups.hide." + e, t)
                },
                hideAll: h,
                setContainer: p,
                refresh: function(e) {
                    f[e].data("instance", c), c.events.trigger("popups.refresh." + e);
                    for (var t = f[e].find(".fr-command"), n = 0; n < t.length; n++) {
                        var r = M(t[n]);
                        0 === r.parents(".fr-dropdown-menu").length && c.button.refresh(r)
                    }
                },
                onRefresh: function(e, t) {
                    c.events.on("popups.refresh." + e, t)
                },
                onShow: function(e, t) {
                    c.events.on("popups.show." + e, t)
                },
                isVisible: u,
                areVisible: g
            }
        }, M.FE.MODULES.position = function(E) {
            function o() {
                var e = E.selection.ranges(0).getBoundingClientRect();
                if (0 === e.top && 0 === e.left && 0 === e.width || 0 === e.height) {
                    var t = !1;
                    0 === E.$el.find(".fr-marker").length && (E.selection.save(), t = !0);
                    var n = E.$el.find(".fr-marker:first");
                    n.css("display", "inline"), n.css("line-height", "");
                    var r = n.offset(),
                        o = n.outerHeight();
                    n.css("display", "none"), n.css("line-height", 0), (e = {}).left = r.left, e.width = 0, e.height = o, e.top = r.top - (E.helpers.isMobile() && !E.helpers.isIOS() || E.opts.iframe ? 0 : E.helpers.scrollTop()), e.right = 1, e.bottom = 1, e.ok = !0, t && E.selection.restore()
                }
                return e
            }
            function i(e, t, n, r) {
                var o = n.data("container");
                !o || "BODY" === o.get(0).tagName && "static" == o.css("position") || (e && (e -= o.offset().left), t && (t -= o.offset().top), "BODY" != o.get(0).tagName ? (e && (e += o.get(0).scrollLeft), t && (t += o.get(0).scrollTop)) : "absolute" == o.css("position") && (e && (e += o.position().left), t && (t += o.position().top))), E.opts.iframe && o && E.$tb && o.get(0) != E.$tb.get(0) && (e && (e += E.$iframe.offset().left), t && (t += E.$iframe.offset().top));
                var i, a, s = (i = e, a = n.outerWidth(!0), i + a > E.$sc.get(0).clientWidth - 10 && (i = E.$sc.get(0).clientWidth - a - 10), i < 0 && (i = 10), i);
                if (e) {
                    n.css("left", s);
                    var l = n.data("fr-arrow");
                    l || (l = n.find(".fr-arrow"), n.data("fr-arrow", l)), l.data("margin-left") || l.data("margin-left", E.helpers.getPX(l.css("margin-left"))), l.css("margin-left", e - s + l.data("margin-left"))
                }
                t && n.css("top", function(e, t, n) {
                    var r = e.outerHeight(!0);
                    if (!E.helpers.isMobile() && E.$tb && e.parent().get(0) != E.$tb.get(0)) {
                        var o = e.parent().offset().top,
                            i = t - r - (n || 0);
                        e.parent().get(0) == E.$sc.get(0) && (o -= e.parent().position().top);
                        var a = E.$sc.get(0).clientHeight;
                        o + t + r > E.$sc.offset().top + a && 0 < e.parent().offset().top + i && 0 < i ? i > E.$wp.scrollTop() && (t = i, e.addClass("fr-above")) : e.removeClass("fr-above")
                    }
                    return t
                }(n, t, r))
            }
            function n(e) {
                var n = M(e),
                    t = n.is(".fr-sticky-on"),
                    r = n.data("sticky-top"),
                    o = n.data("sticky-scheduled");
                if (void 0 === r) {
                    n.data("sticky-top", 0);
                    var i = M('<div class="fr-sticky-dummy" style="height: ' + n.outerHeight() + 'px;"></div>');
                    E.$box.prepend(i)
                } else E.$box.find(".fr-sticky-dummy").css("height", n.outerHeight());
                if (E.core.hasFocus() || 0 < E.$tb.find("input:visible:focus").length) {
                    var a = E.helpers.scrollTop(),
                        s = Math.min(Math.max(a - E.$tb.parent().offset().top, 0), E.$tb.parent().outerHeight() - n.outerHeight());
                    s != r && s != o && (clearTimeout(n.data("sticky-timeout")), n.data("sticky-scheduled", s), n.outerHeight() < a - E.$tb.parent().offset().top && n.addClass("fr-opacity-0"), n.data("sticky-timeout", setTimeout(function() {
                        var e = E.helpers.scrollTop(),
                            t = Math.min(Math.max(e - E.$tb.parent().offset().top, 0), E.$tb.parent().outerHeight() - n.outerHeight());
                        0 < t && "BODY" == E.$tb.parent().get(0).tagName && (t += E.$tb.parent().position().top), t != r && (n.css("top", Math.max(t, 0)), n.data("sticky-top", t), n.data("sticky-scheduled", t)), n.removeClass("fr-opacity-0")
                    }, 100))), t || (n.css("top", "0"), n.width(E.$tb.parent().width()), n.addClass("fr-sticky-on"), E.$box.addClass("fr-sticky-box"))
                } else clearTimeout(M(e).css("sticky-timeout")), n.css("top", "0"), n.css("position", ""), n.width(""), n.data("sticky-top", 0), n.removeClass("fr-sticky-on"), E.$box.removeClass("fr-sticky-box")
            }
            function t(e) {
                if (e.offsetWidth) {
                    var t, n, r = M(e),
                        o = r.outerHeight(),
                        i = r.data("sticky-position"),
                        a = M("body" == E.opts.scrollableContainer ? E.o_win : E.opts.scrollableContainer).outerHeight(),
                        s = 0,
                        l = 0;
                    "body" !== E.opts.scrollableContainer && (s = E.$sc.offset().top, l = M(E.o_win).outerHeight() - s - a);
                    var d = "body" == E.opts.scrollableContainer ? E.helpers.scrollTop() : s,
                        c = r.is(".fr-sticky-on");
                    r.data("sticky-parent") || r.data("sticky-parent", r.parent());
                    var f = r.data("sticky-parent"),
                        p = f.offset().top,
                        u = f.outerHeight();
                    if (r.data("sticky-offset") ? E.$box.find(".fr-sticky-dummy").css("height", o + "px") : (r.data("sticky-offset", !0), r.after('<div class="fr-sticky-dummy" style="height: ' + o + 'px;"></div>')), !i) {
                        var g = "auto" !== r.css("top") || "auto" !== r.css("bottom");
                        g || r.css("position", "fixed"), i = {
                            top: E.node.hasClass(r.get(0), "fr-top"),
                            bottom: E.node.hasClass(r.get(0), "fr-bottom")
                        }, g || r.css("position", ""), r.data("sticky-position", i), r.data("top", E.node.hasClass(r.get(0), "fr-top") ? r.css("top") : "auto"), r.data("bottom", E.node.hasClass(r.get(0), "fr-bottom") ? r.css("bottom") : "auto")
                    }
                    t = E.helpers.getPX(r.data("top")), n = E.helpers.getPX(r.data("bottom"));
                    var h = i.top && p < d + t && d + t <= p + u - o && (E.helpers.isInViewPort(E.$sc.get(0)) || "body" == E.opts.scrollableContainer),
                        m = i.bottom && p + o < d + a - n && d + a - n < p + u;
                    h || m ? (r.css("width", f.get(0).getBoundingClientRect().width + "px"), c || (r.addClass("fr-sticky-on"), r.removeClass("fr-sticky-off"), r.css("top") && ("auto" != r.data("top") ? r.css("top", E.helpers.getPX(r.data("top")) + s) : r.data("top", "auto")), r.css("bottom") && ("auto" != r.data("bottom") ? r.css("bottom", E.helpers.getPX(r.data("bottom")) + l) : r.css("bottom", "auto")))) : E.node.hasClass(r.get(0), "fr-sticky-off") || (r.width(""), r.removeClass("fr-sticky-on"), r.addClass("fr-sticky-off"), r.css("top") && "auto" != r.data("top") && i.top && r.css("top", 0), r.css("bottom") && "auto" != r.data("bottom") && i.bottom && r.css("bottom", 0))
                }
            }
            function r() {
                var e = document.createElement("test").style;
                return e.cssText = "position:" + ["-webkit-", "-moz-", "-ms-", "-o-", ""].join("sticky; position:") + " sticky;", -1 !== e.position.indexOf("sticky") && !E.helpers.isIOS() && !E.helpers.isAndroid() && !E.browser.chrome
            }
            function e() {
                if (E._stickyElements) for (var e = 0; e < E._stickyElements.length; e++) t(E._stickyElements[e])
            }
            return {
                _init: function() {
                    !
                        function() {
                            if (!r()) if (E._stickyElements = [], E.helpers.isIOS()) {
                                var t = function() {
                                    if (E.helpers.requestAnimationFrame()(t), !1 !== E.events.trigger("position.refresh")) for (var e = 0; e < E._stickyElements.length; e++) n(E._stickyElements[e])
                                };
                                t(), E.events.$on(M(E.o_win), "scroll", function() {
                                    if (E.core.hasFocus()) for (var e = 0; e < E._stickyElements.length; e++) {
                                        var t = M(E._stickyElements[e]),
                                            n = t.parent(),
                                            r = E.helpers.scrollTop();
                                        t.outerHeight() < r - n.offset().top && (t.addClass("fr-opacity-0"), t.data("sticky-top", -1), t.data("sticky-scheduled", -1))
                                    }
                                }, !0)
                            } else "body" !== E.opts.scrollableContainer && E.events.$on(M(E.opts.scrollableContainer), "scroll", e, !0), E.events.$on(M(E.o_win), "scroll", e, !0), E.events.$on(M(E.o_win), "resize", e, !0), E.events.on("initialized", e), E.events.on("focus", e), E.events.$on(M(E.o_win), "resize", "textarea", e, !0);
                            E.events.on("destroy", function() {
                                E._stickyElements = []
                            })
                        }()
                },
                forSelection: function(e) {
                    var t = o();
                    e.css({
                        top: 0,
                        left: 0
                    });
                    var n = t.top + t.height,
                        r = t.left + t.width / 2 - e.get(0).offsetWidth / 2 + E.helpers.scrollLeft();
                    E.opts.iframe || (n += E.helpers.scrollTop()), i(r, n, e, t.height)
                },
                addSticky: function(e) {
                    e.addClass("fr-sticky"), E.helpers.isIOS() && e.addClass("fr-sticky-ios"), r() || (e.removeClass("fr-sticky"), E._stickyElements.push(e.get(0)))
                },
                refresh: e,
                at: i,
                getBoundingRect: o
            }
        }, M.FE.MODULES.refresh = function(o) {
            function i(e, t) {
                e.toggleClass("fr-disabled", t).attr("aria-disabled", t)
            }
            return {
                undo: function(e) {
                    i(e, !o.undo.canDo())
                },
                redo: function(e) {
                    i(e, !o.undo.canRedo())
                },
                outdent: function(e) {
                    if (o.node.hasClass(e.get(0), "fr-no-refresh")) return !1;
                    for (var t = o.selection.blocks(), n = 0; n < t.length; n++) {
                        var r = "rtl" == o.opts.direction || "rtl" == M(t[n]).css("direction") ? "margin-right" : "margin-left";
                        if ("LI" == t[n].tagName || "LI" == t[n].parentNode.tagName) return i(e, !1), !0;
                        if (0 < o.helpers.getPX(M(t[n]).css(r))) return i(e, !1), !0
                    }
                    i(e, !0)
                },
                indent: function(e) {
                    if (o.node.hasClass(e.get(0), "fr-no-refresh")) return !1;
                    for (var t = o.selection.blocks(), n = 0; n < t.length; n++) {
                        for (var r = t[n].previousSibling; r && r.nodeType == Node.TEXT_NODE && 0 === r.textContent.length;) r = r.previousSibling;
                        if ("LI" != t[n].tagName || r) return i(e, !1), !0;
                        i(e, !0)
                    }
                }
            }
        }, M.extend(M.FE.DEFAULTS, {
            editInPopup: !1
        }), M.FE.MODULES.textEdit = function(n) {
            function t() {
                n.events.$on(n.$el, n._mouseup, function() {
                    setTimeout(function() {
                        var e, t;
                        t = n.popups.get("text.edit"), e = "INPUT" === n.$el.prop("tagName") ? n.$el.attr("placeholder") : n.$el.text(), t.find("input").val(e).trigger("change"), n.popups.setContainer("text.edit", n.$sc), n.popups.show("text.edit", n.$el.offset().left + n.$el.outerWidth() / 2, n.$el.offset().top + n.$el.outerHeight(), n.$el.outerHeight())
                    }, 10)
                })
            }
            return {
                _init: function() {
                    var e;
                    n.opts.editInPopup && (e = {
                        edit: '<div id="fr-text-edit-' + n.id + '" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="' + n.language.translate("Text") + '" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">' + n.language.translate("Update") + "</button></div></div>"
                    }, n.popups.create("text.edit", e), t())
                },
                update: function() {
                    var e = n.popups.get("text.edit").find("input").val();
                    0 === e.length && (e = n.opts.placeholderText), "INPUT" === n.$el.prop("tagName") ? n.$el.attr("placeholder", e) : n.$el.text(e), n.events.trigger("contentChanged"), n.popups.hide("text.edit")
                }
            }
        }, M.FE.RegisterCommand("updateText", {
            focus: !1,
            undo: !1,
            callback: function() {
                this.textEdit.update()
            }
        }), M.extend(M.FE.DEFAULTS, {
            toolbarBottom: !1,
            toolbarButtons: null,
            toolbarButtonsXS: null,
            toolbarButtonsSM: null,
            toolbarButtonsMD: null,
            toolbarContainer: null,
            toolbarInline: !1,
            toolbarSticky: !0,
            toolbarStickyOffset: 0,
            toolbarVisibleWithoutSelection: !1
        }), M.FE.TOOLBAR_BUTTONS = ["fullscreen", "bold", "italic", "underline", "strikeThrough", "subscript", "superscript", "|", "fontFamily", "fontSize", "color", "inlineStyle", "paragraphStyle", "|", "paragraphFormat", "align", "formatOL", "formatUL", "outdent", "indent", "quote", "-", "insertLink", "insertImage", "insertVideo", "embedly", "insertFile", "insertTable", "|", "emoticons", "specialCharacters", "insertHR", "selectAll", "clearFormatting", "|", "print", "spellChecker", "help", "html", "|", "undo", "redo"], M.FE.TOOLBAR_BUTTONS_MD = null, M.FE.TOOLBAR_BUTTONS_SM = ["bold", "italic", "underline", "|", "fontFamily", "fontSize", "insertLink", "insertImage", "table", "|", "undo", "redo"], M.FE.TOOLBAR_BUTTONS_XS = ["bold", "italic", "fontFamily", "fontSize", "|", "undo", "redo"], M.FE.MODULES.toolbar = function(o) {
            var r = [];

            function i(e, t) {
                for (var n = 0; n < t.length; n++)"-" != t[n] && "|" != t[n] && e.indexOf(t[n]) < 0 && e.push(t[n])
            }
            function a() {
                var e = o.helpers.screenSize();
                return r[e]
            }
            function e() {
                var e = a();
                o.$tb.find(".fr-separator").remove(), o.$tb.find("> .fr-command").addClass("fr-hidden");
                for (var t = 0; t < e.length; t++) if ("|" == e[t] || "-" == e[t]) o.$tb.append(o.button.buildList([e[t]]));
                else {
                    var n = o.$tb.find('> .fr-command[data-cmd="' + e[t] + '"]'),
                        r = null;
                    o.node.hasClass(n.next().get(0), "fr-dropdown-menu") && (r = n.next()), n.removeClass("fr-hidden").appendTo(o.$tb), r && r.appendTo(o.$tb)
                }
            }
            function t(e, t) {
                setTimeout(function() {
                    if ((!e || e.which != M.FE.KEYCODE.ESC) && o.selection.inEditor() && o.core.hasFocus() && !o.popups.areVisible() && (o.opts.toolbarVisibleWithoutSelection || !o.selection.isCollapsed() && !o.keys.isIME() || t)) {
                        if (o.$tb.data("instance", o), !1 === o.events.trigger("toolbar.show", [e])) return !1;
                        o.$tb.show(), o.opts.toolbarContainer || o.position.forSelection(o.$tb), 1 < o.opts.zIndex ? o.$tb.css("z-index", o.opts.zIndex + 1) : o.$tb.css("z-index", null)
                    }
                }, 0)
            }
            function n(e) {
                return (!e || "blur" !== e.type || document.activeElement !== o.el) && (!(!e || "keydown" !== e.type || !o.keys.ctrlKey(e)) || ( !! o.button.getButtons(".fr-dropdown.fr-active").next().find(o.o_doc.activeElement).length || void(!1 !== o.events.trigger("toolbar.hide") && o.$tb.hide())))
            }
            r[M.FE.XS] = o.opts.toolbarButtonsXS || o.opts.toolbarButtons || M.FE.TOOLBAR_BUTTONS_XS || M.FE.TOOLBAR_BUTTONS || [], r[M.FE.SM] = o.opts.toolbarButtonsSM || o.opts.toolbarButtons || M.FE.TOOLBAR_BUTTONS_SM || M.FE.TOOLBAR_BUTTONS || [], r[M.FE.MD] = o.opts.toolbarButtonsMD || o.opts.toolbarButtons || M.FE.TOOLBAR_BUTTONS_MD || M.FE.TOOLBAR_BUTTONS || [], r[M.FE.LG] = o.opts.toolbarButtons || M.FE.TOOLBAR_BUTTONS || [];
            var s = null;

            function l(e) {
                clearTimeout(s), e && e.which == M.FE.KEYCODE.ESC || (s = setTimeout(t, o.opts.typingTimer))
            }
            function d() {
                o.events.on("window.mousedown", n), o.events.on("keydown", n), o.events.on("blur", n), o.helpers.isMobile() || o.events.on("window.mouseup", t), o.helpers.isMobile() ? o.helpers.isIOS() || (o.events.on("window.touchend", t), o.browser.mozilla && setInterval(t, 200)) : o.events.on("window.keyup", l), o.events.on("keydown", function(e) {
                    e && e.which == M.FE.KEYCODE.ESC && n()
                }), o.events.on("keydown", function(e) {
                    if (e.which == M.FE.KEYCODE.ALT) return e.stopPropagation(), !1
                }, !0), o.events.$on(o.$wp, "scroll.toolbar", t), o.events.on("commands.after", t), o.helpers.isMobile() && (o.events.$on(o.$doc, "selectionchange", l), o.events.$on(o.$doc, "orientationchange", t))
            }
            function c() {
                o.$tb.html("").removeData().remove(), o.$tb = null
            }
            function f() {
                o.$box.removeClass("fr-top fr-bottom fr-inline fr-basic"), o.$box.find(".fr-sticky-dummy").remove()
            }
            function p() {
                o.opts.theme && o.$tb.addClass(o.opts.theme + "-theme"), 1 < o.opts.zIndex && o.$tb.css("z-index", o.opts.zIndex + 1), "auto" != o.opts.direction && o.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-" + o.opts.direction), o.helpers.isMobile() ? o.$tb.addClass("fr-mobile") : o.$tb.addClass("fr-desktop"), o.opts.toolbarContainer ? (o.opts.toolbarInline && (d(), n()), o.opts.toolbarBottom ? o.$tb.addClass("fr-bottom") : o.$tb.addClass("fr-top")) : o.opts.toolbarInline ? (o.$sc.append(o.$tb), o.$tb.data("container", o.$sc), o.$tb.addClass("fr-inline"), o.$tb.prepend('<span class="fr-arrow"></span>'), d(), o.opts.toolbarBottom = !1) : (o.opts.toolbarBottom && !o.helpers.isIOS() ? (o.$box.append(o.$tb), o.$tb.addClass("fr-bottom"), o.$box.addClass("fr-bottom")) : (o.opts.toolbarBottom = !1, o.$box.prepend(o.$tb), o.$tb.addClass("fr-top"), o.$box.addClass("fr-top")), o.$tb.addClass("fr-basic"), o.opts.toolbarSticky && (o.opts.toolbarStickyOffset && (o.opts.toolbarBottom ? o.$tb.css("bottom", o.opts.toolbarStickyOffset) : o.$tb.css("top", o.opts.toolbarStickyOffset)), o.position.addSticky(o.$tb))), function() {
                    var e = M.merge([], a());
                    i(e, r[M.FE.XS]), i(e, r[M.FE.SM]), i(e, r[M.FE.MD]), i(e, r[M.FE.LG]);
                    for (var t = e.length - 1; 0 <= t; t--)"-" != e[t] && "|" != e[t] && e.indexOf(e[t]) < t && e.splice(t, 1);
                    var n = o.button.buildList(e, a());
                    o.$tb.append(n), o.button.bindCommands(o.$tb)
                }(), o.events.$on(M(o.o_win), "resize", e), o.events.$on(M(o.o_win), "orientationchange", e), o.accessibility.registerToolbar(o.$tb), o.events.$on(o.$tb, o._mousedown + " " + o._mouseup, function(e) {
                    var t = e.originalEvent ? e.originalEvent.target || e.originalEvent.originalTarget : null;
                    if (t && "INPUT" != t.tagName && !o.edit.isDisabled()) return e.stopPropagation(), e.preventDefault(), !1
                }, !0)
            }
            var u = !1;
            return {
                _init: function() {
                    if (o.$sc = M(o.opts.scrollableContainer).first(), !o.$wp) return !1;
                    o.opts.toolbarContainer ? (o.shared.$tb ? (o.$tb = o.shared.$tb, o.opts.toolbarInline && d()) : (o.shared.$tb = M('<div class="fr-toolbar"></div>'), o.$tb = o.shared.$tb, M(o.opts.toolbarContainer).append(o.$tb), p(), o.$tb.data("instance", o)), o.opts.toolbarInline ? o.$box.addClass("fr-inline") : o.$box.addClass("fr-basic"), o.events.on("focus", function() {
                        o.$tb.data("instance", o)
                    }, !0), o.opts.toolbarInline = !1) : o.opts.toolbarInline ? (o.$box.addClass("fr-inline"), o.shared.$tb ? (o.$tb = o.shared.$tb, d()) : (o.shared.$tb = M('<div class="fr-toolbar"></div>'), o.$tb = o.shared.$tb, p())) : (o.$box.addClass("fr-basic"), o.$tb = M('<div class="fr-toolbar"></div>'), p(), o.$tb.data("instance", o)), o.events.on("destroy", f, !0), o.events.on(o.opts.toolbarInline || o.opts.toolbarContainer ? "shared.destroy" : "destroy", c, !0)
                },
                hide: n,
                show: function() {
                    if (!1 === o.events.trigger("toolbar.show")) return !1;
                    o.$tb.show()
                },
                showInline: t,
                disable: function() {
                    !u && o.$tb && (o.$tb.find("> .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled", !0), u = !0)
                },
                enable: function() {
                    u && o.$tb && (o.$tb.find("> .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled", !1), u = !1), o.button.bulkRefresh()
                }
            }
        }
    });